@Test
    public void nonExistingFieldCausesException() throws IOException {
        Exception expected = assertThrows(IllegalArgumentException.class,
                                          () -> docFromJson("""
                                                            {
                                                              "put": "id:unittest:smoke::whee",
                                                              "fields": {
                                                                "smething": "smoketest",
                                                                "nalle": "bamse"
                                                              }
                                                            }
                                                            """));
        assertTrue(expected.getMessage().startsWith("No field 'smething' in the structure of type 'smoke'"));
    }
Basic test of JSON streams to Vespa document instances.

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