@Test
    void testValidationOfSchemaAndDocumentInheritanceConsistency() throws ParseException {
        try {
            String parent = joinLines(
                    "schema parent {" +
                            "  document parent {" +
                            "    field pf1 type string {" +
                            "      indexing: summary" +
                            "    }" +
                            "  }" +
                            "}");
            String child = joinLines(
                    "schema child inherits parent {" +
                            "  document child {" +
                            "    field cf1 type string {" +
                            "      indexing: summary" +
                            "    }" +
                            "  }" +
                            "}");
            ApplicationBuilder.createFromStrings(new DeployLoggerStub(), parent, child);
            fail("Expected exception");
        }
        catch (IllegalArgumentException e) {
            assertEquals("schema 'child' inherits 'parent', " +
                    "but its document type does not inherit the parent's document type"
            , e.getMessage());
        }
    }
Schema tests that don't depend on files.

@author bratseth
config-model/src/test/java/com/yahoo/schema/SchemaTestCase.java