@Test
    void testInheritingMultipleRankProfilesWithOverlappingConstructsIsDisallowed2() throws ParseException {
        try {
            String profile = joinLines(
                    "schema test {" +
                            "  document test {" +
                            "    field title type string {" +
                            "      indexing: summary" +
                            "    }" +
                            "  }" +
                            "  rank-profile r1 {" +
                            "    function f1() {" +
                            "      expression: fieldMatch(title)" +
                            "    }" +
                            "  }" +
                            "  rank-profile r2 {" +
                            "    function f1() {" +
                            "      expression: fieldMatch(title)" +
                            "    }" +
                            "  }" +
                            "  rank-profile r3 inherits r1, r2 {" +
                            "  }" +
                            "}");
            ApplicationBuilder.createFromStrings(new DeployLoggerStub(), profile);
            fail("Expected exception");
        }
        catch (IllegalArgumentException e) {
            assertEquals("rank profile 'r3' inherits rank profile 'r2' which contains function 'f1', but this function is already defined in another profile this inherits",
                    e.getMessage());
        }
    }
Schema tests that don't depend on files.

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