### Question:
JSONVocabularyHelper implements VocabularyHelper { @Override public Set<String> getInvalidTerms(Element docRoot) throws JDOMException { return generateInvalidTermsList(docRoot, false); }  @Override List<List<String>> getAuthoritativeForm(String term); @Override List<List<String>> getAuthoritativeForms(Element docRoot); @Override Set<String> getInvalidTerms(Element docRoot); @Override Set<String> getInvalidTermsWithPrefix(Element docRoot); @Override boolean updateDocumentTerms(Element docElement); @Override Collection<String> getVocabularyTerms(); @Override void setSelector(String selector); @Override void setSelectorNamespaces(Namespace[] namespaces); @Override String getSelector(); void setInvalidTermPrefix(String prefix); @Override String getInvalidTermPrefix(); @Override String getVocabularyURI(); @Override void setVocabularyURI(String vocabularyURI); @Override void setContent(byte[] content);  }### Answer:
@Test public void getInvalidTermsTest() throws Exception { SAXBuilder builder = new SAXBuilder(); InputStream modsStream = new FileInputStream(new File("src/test/resources/vocabTest.xml")); Document modsDoc = builder.build(modsStream); Set<String> invalids = helper.getInvalidTerms(modsDoc.getRootElement()); assertEquals("Incorrect number of invalid terms", 2, invalids.size()); assertTrue("Designated Destroyer not detected", invalids.contains("Designated Destroyer")); assertTrue(invalids.contains("Advisor")); }