@Test
public void noLocalesnoMain() throws URISyntaxException, JDOMException, NoSuchFileException {

    Element input = Xml.loadFile(Paths.get(ISO19139SchemaPluginTest.class.getClassLoader().getResource("schema/iso19139/languages/main_charstring.xml").toURI()));
    ((List<Element>) Xml.selectNodes(input, ".//gmd:language", ALL_NAMESPACES)).stream().forEach(Element::detach);
    ((List<Element>) Xml.selectNodes(input, ".//gmd:locale", ALL_NAMESPACES)).stream().forEach(Element::detach);
    List<String> languages = ISO19139SchemaPlugin.getLanguages(input);
    assertArrayEquals(new String[] {}, languages.toArray());
}