LinkedHashMap<Phrase,Short> ranks = frequentPhrases.getRanks();
Iterator<Map.Entry<Phrase,Short>> i = ranks.entrySet().iterator();
Assert.assertNotNull(i);
Map.Entry<Phrase,Short> entry;
Phrase phrase;
short rank;
Assert.assertTrue(i.hasNext());
entry = i.next();
phrase = entry.getKey();
Assert.assertNotNull(phrase);
Assert.assertEquals(phrase.toString(), "the");
rank = entry.getValue();
Assert.assertEquals(rank, 0);
Assert.assertTrue(i.hasNext());
entry = i.next();
phrase = entry.getKey();
Assert.assertNotNull(phrase);
Assert.assertEquals(phrase.toString(), "of");
rank = entry.getValue();
Assert.assertEquals(rank, 1);
Assert.assertTrue(i.hasNext());
entry = i.next();
phrase = entry.getKey();
Assert.assertNotNull(phrase);
Assert.assertEquals(phrase.toString(), "to");
rank = entry.getValue();
Assert.assertEquals(rank, 2);
Assert.assertTrue(i.hasNext());
entry = i.next();
phrase = entry.getKey();
Assert.assertNotNull(phrase);
Assert.assertEquals(phrase.toString(), "that");
rank = entry.getValue();
Assert.assertEquals(rank, 3);
Assert.assertTrue(i.hasNext());
entry = i.next();
phrase = entry.getKey();
Assert.assertNotNull(phrase);
Assert.assertEquals(phrase.toString(), ".");
rank = entry.getValue();
Assert.assertEquals(rank, 4);
Assert.assertTrue(i.hasNext());
entry = i.next();
phrase = entry.getKey();
Assert.assertNotNull(phrase);
Assert.assertEquals(phrase.toString(), "chromosome");
rank = entry.getValue();
Assert.assertEquals(rank, 5);
Assert.assertTrue(i.hasNext());
entry = i.next();
phrase = entry.getKey();
Assert.assertNotNull(phrase);
Assert.assertEquals(phrase.toString(), "genes");
rank = entry.getValue();
Assert.assertEquals(rank, 6);
Assert.assertTrue(i.hasNext());
entry = i.next();
phrase = entry.getKey();
Assert.assertNotNull(phrase);
Assert.assertEquals(phrase.toString(), ",");
rank = entry.getValue();
Assert.assertEquals(rank, 7);
Assert.assertTrue(i.hasNext());
entry = i.next();
phrase = entry.getKey();
Assert.assertNotNull(phrase);
Assert.assertEquals(phrase.toString(), "is");
rank = entry.getValue();
Assert.assertEquals(rank, 8);
Assert.assertFalse(i.hasNext());
}