### Question:
NgramModel implements Serializable { public int size() { return occur.keySet().size(); } NgramModel(int order);  NgramModel(File file); int size(); void save(File file); double[] getGoodTuringPars(); int occurrences(String key); void addWord(String word); void addWords(File file, Charset encoding, boolean caseSensitive); double logWordProb(String word); double logPerWordLikelihood(boolean caseSensitive); void addText(InputStream is); double logLikelihood(InputStream is, int contextLength); double logLikelihood(String context, String input); double logProb(String context, char c); @Override String toString(); void showDiff(NgramModel other); boolean equals(NgramModel other); @Override boolean equals(Object o); @Override int hashCode(); static void main(String[] args);  }### Answer:
@Test public void testSize() { System.out.println("size"); NgramModel ngrams = new NgramModel(2); ngrams.addWord("0000"); ngrams.addWord("0100"); int expResult = 9; int result = ngrams.size(); assertEquals(expResult, result); ngrams = new NgramModel(3); ngrams.addWord("0000"); ngrams.addWord("0100"); expResult = 15; result = ngrams.size(); assertEquals(expResult, result); }