WordRankMP implements Cloneable { @Override public WordRankMP clone() throws CloneNotSupportedException { WordRankMP mp = (WordRankMP)super.clone(); return mp; }  @MessageHandler void handleWordCount(WordCount wordCount); @Override WordRankMP clone();  }
@Test public void cloneTest() throws CloneNotSupportedException { WordRankMP clone = mp.clone(); Assert.assertNotNull(clone); Assert.assertNotSame(mp, clone); clone.map = new ConcurrentHashMap<Word, WordCount>(); Assert.assertNull(mp.map); Assert.assertNotNull(clone.map); }