@@ -527,7 +527,7 @@ public void testAutoConvertNotString() throws Exception {
527527 }
528528 default -> throw new UnsupportedOperationException ();
529529 }
530- IngestDocument ingestDocument = RandomDocumentPicks .randomIngestDocument (random (), Map .of ("field" , randomValue ));
530+ IngestDocument ingestDocument = RandomDocumentPicks .randomIngestDocument (random (), new HashMap <>( Map .of ("field" , randomValue ) ));
531531 Processor processor = new ConvertProcessor (randomAlphaOfLength (10 ), null , "field" , "field" , Type .AUTO , false );
532532 processor .execute (ingestDocument );
533533 Object convertedValue = ingestDocument .getFieldValue ("field" , Object .class );
@@ -536,7 +536,7 @@ public void testAutoConvertNotString() throws Exception {
536536
537537 public void testAutoConvertStringNotMatched () throws Exception {
538538 String value = "notAnIntFloatOrBool" ;
539- IngestDocument ingestDocument = RandomDocumentPicks .randomIngestDocument (random (), Map .of ("field" , value ));
539+ IngestDocument ingestDocument = RandomDocumentPicks .randomIngestDocument (random (), new HashMap <>( Map .of ("field" , value ) ));
540540 Processor processor = new ConvertProcessor (randomAlphaOfLength (10 ), null , "field" , "field" , Type .AUTO , false );
541541 processor .execute (ingestDocument );
542542 Object convertedValue = ingestDocument .getFieldValue ("field" , Object .class );
@@ -546,7 +546,7 @@ public void testAutoConvertStringNotMatched() throws Exception {
546546 public void testAutoConvertMatchBoolean () throws Exception {
547547 boolean randomBoolean = randomBoolean ();
548548 String booleanString = Boolean .toString (randomBoolean );
549- IngestDocument ingestDocument = RandomDocumentPicks .randomIngestDocument (random (), Map .of ("field" , booleanString ));
549+ IngestDocument ingestDocument = RandomDocumentPicks .randomIngestDocument (random (), new HashMap <>( Map .of ("field" , booleanString ) ));
550550 Processor processor = new ConvertProcessor (randomAlphaOfLength (10 ), null , "field" , "field" , Type .AUTO , false );
551551 processor .execute (ingestDocument );
552552 Object convertedValue = ingestDocument .getFieldValue ("field" , Object .class );
@@ -556,7 +556,7 @@ public void testAutoConvertMatchBoolean() throws Exception {
556556 public void testAutoConvertMatchInteger () throws Exception {
557557 int randomInt = randomInt ();
558558 String randomString = Integer .toString (randomInt );
559- IngestDocument ingestDocument = RandomDocumentPicks .randomIngestDocument (random (), Map .of ("field" , randomString ));
559+ IngestDocument ingestDocument = RandomDocumentPicks .randomIngestDocument (random (), new HashMap <>( Map .of ("field" , randomString ) ));
560560 Processor processor = new ConvertProcessor (randomAlphaOfLength (10 ), null , "field" , "field" , Type .AUTO , false );
561561 processor .execute (ingestDocument );
562562 Object convertedValue = ingestDocument .getFieldValue ("field" , Object .class );
@@ -566,7 +566,7 @@ public void testAutoConvertMatchInteger() throws Exception {
566566 public void testAutoConvertMatchLong () throws Exception {
567567 long randomLong = randomLong ();
568568 String randomString = Long .toString (randomLong );
569- IngestDocument ingestDocument = RandomDocumentPicks .randomIngestDocument (random (), Map .of ("field" , randomString ));
569+ IngestDocument ingestDocument = RandomDocumentPicks .randomIngestDocument (random (), new HashMap <>( Map .of ("field" , randomString ) ));
570570 Processor processor = new ConvertProcessor (randomAlphaOfLength (10 ), null , "field" , "field" , Type .AUTO , false );
571571 processor .execute (ingestDocument );
572572 Object convertedValue = ingestDocument .getFieldValue ("field" , Object .class );
@@ -577,7 +577,7 @@ public void testAutoConvertDoubleNotMatched() throws Exception {
577577 double randomDouble = randomDouble ();
578578 String randomString = Double .toString (randomDouble );
579579 float randomFloat = Float .parseFloat (randomString );
580- IngestDocument ingestDocument = RandomDocumentPicks .randomIngestDocument (random (), Map .of ("field" , randomString ));
580+ IngestDocument ingestDocument = RandomDocumentPicks .randomIngestDocument (random (), new HashMap <>( Map .of ("field" , randomString ) ));
581581 Processor processor = new ConvertProcessor (randomAlphaOfLength (10 ), null , "field" , "field" , Type .AUTO , false );
582582 processor .execute (ingestDocument );
583583 Object convertedValue = ingestDocument .getFieldValue ("field" , Object .class );
@@ -588,7 +588,7 @@ public void testAutoConvertDoubleNotMatched() throws Exception {
588588 public void testAutoConvertMatchFloat () throws Exception {
589589 float randomFloat = randomFloat ();
590590 String randomString = Float .toString (randomFloat );
591- IngestDocument ingestDocument = RandomDocumentPicks .randomIngestDocument (random (), Map .of ("field" , randomString ));
591+ IngestDocument ingestDocument = RandomDocumentPicks .randomIngestDocument (random (), new HashMap <>( Map .of ("field" , randomString ) ));
592592 Processor processor = new ConvertProcessor (randomAlphaOfLength (10 ), null , "field" , "field" , Type .AUTO , false );
593593 processor .execute (ingestDocument );
594594 Object convertedValue = ingestDocument .getFieldValue ("field" , Object .class );
0 commit comments