@Test
    public void testAssignToWeightedSet() throws IOException {
        DocumentUpdate doc = parseUpdate("""
                                         {
                                           "update": "id:unittest:testset::whee",
                                           "fields": {
                                             "actualset": {
                                               "assign": {
                                                 "person": 37,
                                                 "another person": 41
                                               }
                                             }
                                           }
                                         }
                                         """);
        FieldUpdate x = doc.getFieldUpdate("actualset");
        assertEquals(1, x.size());
        AssignValueUpdate assign = (AssignValueUpdate) x.getValueUpdate(0);
        WeightedSet<?> w = (WeightedSet<?>) assign.getValue();
        assertEquals(2, w.size());
        assertEquals(Integer.valueOf(37), w.get(new StringFieldValue("person")));
        assertEquals(Integer.valueOf(41), w.get(new StringFieldValue("another person")));
    }
Basic test of JSON streams to Vespa document instances.

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