@Test
public void testGroupBy() throws Exception {
List<ScoredUrlDatum> urls = makeUrls(2, null);
long fetchTime = System.currentTimeMillis();
PartitioningKey groupingKey1 = new PartitioningKey("key1", 1);
FetchSetDatum pfd1 = new FetchSetDatum(urls, fetchTime, 0, groupingKey1.getValue(), groupingKey1.getRef());
pfd1.setLastList(true);
Comparable c1 = pfd1.getGroupingKey();
PartitioningKey groupingKey2 = new PartitioningKey("key2", 1);
FetchSetDatum pfd2 = new FetchSetDatum(urls, fetchTime, 0, groupingKey2.getValue(), groupingKey2.getRef());
pfd2.setLastList(true);
Comparable c2 = pfd2.getGroupingKey();
Assert.assertEquals(0, c1.compareTo(c2));
}