@Test
    void testDuplicateNamesInSearchDifferentType() {
        try {
            ApplicationBuilder.createFromString(
                    "search duplicatenamesinsearch {\n" +
                            "  document {\n" +
                            "    field grpphotoids64 type string { }\n" +
                            "  }\n" +
                            "  field grpphotoids64 type array<long> {\n" +
                            "    indexing: input grpphotoids64 | split \" \" | for_each {\n" +
                            "      base64decode } | attribute\n" +
                            "  }\n" +
                            "}");
            fail("Should throw exception.");
        } catch (Exception e) {
            assertEquals("For schema 'duplicatenamesinsearch', field 'grpphotoids64': " +
                    "Incompatible types. Expected Array<long> for index field 'grpphotoids64', got string.", e.getMessage());
        }
    }
Tests that "name" is not allowed as name for a field.

And that duplicate names are not allowed. 

@author Lars Christian Jensen
config-model/src/test/java/com/yahoo/schema/NameFieldCheckTestCase.java