@Test
    void testImportingIncorrect() throws ParseException {
        try {
            ApplicationBuilder.createFromString(
                    "search incorrectsummarytypes {\n" +
                            "  document incorrectsummarytypes {\n" +
                            "    field somestring type string {\n" +
                            "      indexing: summary\n" +
                            "    }\n" +
                            "  }\n" +
                            "  document-summary incorrect {\n" +
                            "    summary somestring type int {\n" +
                            "    }\n" +
                            "  }\n" +
                            "}\n");
            fail("processing should have failed");
        } catch (RuntimeException e) {
            assertEquals("summary 'somestring' in field 'somestring' is inconsistent with summary 'somestring' " +
                         "in document-summary 'incorrect' in schema 'incorrectsummarytypes': " +
                         "All declarations of the same summary field must have the same type", Exceptions.toMessageString(e));
        }
    }
Tests importing a search definition with conflicting summary types

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