@Test
    void testNameField() {
        try {
            ApplicationBuilder.createFromString(
                    "search simple {\n" +
                            "  document name-check {\n" +
                            "    field title type string {\n" +
                            "      indexing: summary | index\n" +
                            "    }\n" +
                            "    # reserved name, should trigger error\n" +
                            "    field sddocname type string {\n" +
                            "      indexing: index\n" +
                            "    }\n" +
                            "  }\n" +
                            "}");
            fail("Should throw exception.");
        } catch (Exception expected) {
            // Success
        }
    }
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