### Question:
MapTermCorpus extends AbstractTermCorpus { @Override public int getNumTerms() { return terms.size(); } MapTermCorpus();  MapTermCorpus(Bag<String> terms, int numDocs); void addTermsFromDocument(Set<String> terms); @Override int getCount(String term); @Override int getNumDocs(); @Override int getNumTerms(); @Override int getNumUniqueTerms(); static MapTermCorpus load(File filePath); static MapTermCorpus load(InputStream inputStream); void save(File file); void clear(); MapTermCorpus getFilteredCorpus(int minOccurrenceCount); MapTermCorpus getReducedCorpus(int maxSize); @Override String toString(); @Override Iterator<String> iterator();  }### Answer:
@Test public void test_getNumTerms() { assertEquals(22, corpus.getNumTerms()); }