@Test
    public void testAssignInsideArrayInMap() throws IOException {
        Document doc = docFromJson("""
                                   {
                                     "put": "id:unittest:testMapStringToArrayOfInt::whee",
                                     "fields": {
                                       "actualMapStringToArrayOfInt": {
                                         "bamse": [1, 2, 3]
                                       }
                                     }
                                   }""");

        assertEquals(2, ((MapFieldValue<StringFieldValue, Array<IntegerFieldValue>>) doc.getFieldValue("actualMapStringToArrayOfInt"))
                .get(StringFieldValue.getFactory().create("bamse")).get(1).getInteger());

        DocumentUpdate update = parseUpdate("""
                                            {
                                              "update": "id:unittest:testMapStringToArrayOfInt::whee",
                                              "fields": {
                                                "actualMapStringToArrayOfInt{bamse}[1]": {
                                                  "assign": 4
                                                }
                                              }
                                            }
                                            """);
        assertEquals(1, update.fieldPathUpdates().size());

        update.applyTo(doc);
        assertEquals(4, ((MapFieldValue<StringFieldValue, Array<IntegerFieldValue>>) doc.getFieldValue("actualMapStringToArrayOfInt"))
                .get(StringFieldValue.getFactory().create("bamse")).get(1).getInteger());
    }
Basic test of JSON streams to Vespa document instances.

@author Steinar Knutsen
@author bratseth
document/src/test/java/com/yahoo/document/json/JsonReaderTestCase.java