### Question:
BitSetBasedBooleanDocumentFrequencyDeterminer implements BooleanDocumentFrequencyDeterminer { public CountedSubsets[] determineCounts(String[][] wordsets, SegmentationDefinition[] definitions) { ObjectObjectOpenHashMap<String, IntOpenHashSet> wordDocMapping = new ObjectObjectOpenHashMap<String, IntOpenHashSet>(); for (int i = 0; i < wordsets.length; ++i) { for (int j = 0; j < wordsets[i].length; ++j) { if (!wordDocMapping.containsKey(wordsets[i][j])) { wordDocMapping.put(wordsets[i][j], new IntOpenHashSet()); } } } corpusAdapter.getDocumentsWithWordsAsSet(wordDocMapping); CountedSubsets countedSubsets[] = new CountedSubsets[definitions.length]; for (int i = 0; i < definitions.length; ++i) { countedSubsets[i] = new CountedSubsets(definitions[i].segments, definitions[i].conditions, createCounts( createBitSets(wordDocMapping, wordsets[i]))); } return countedSubsets; } BitSetBasedBooleanDocumentFrequencyDeterminer(BooleanDocumentSupportingAdapter corpusAdapter); int getNumberOfDocuments(); CountedSubsets[] determineCounts(String[][] wordsets,
            SegmentationDefinition[] definitions);  }### Answer:
@Test public void test() { String words[] = new String[wordDocuments.length]; for (int i = 0; i < words.length; i++) { words[i] = Integer.toString(i); } BooleanDocumentFrequencyDeterminer freqDeterminer = new BitSetBasedBooleanDocumentFrequencyDeterminer(this); CountedSubsets countedSubsets[] = freqDeterminer.determineCounts(new String[][] { words }, new SegmentationDefinition[] { (new AnyAny()).getSubsetDefinition(words.length) }); int counts[] = countedSubsets[0].counts; Assert.assertArrayEquals(expectedCounts, counts); }