@Test
public void testGetJsonSizeIsLimited() throws IOException {

  tracker.addReport("node1", "node2");
  tracker.addReport("node1", "node3");
  tracker.addReport("node2", "node3");
  tracker.addReport("node2", "node4");
  tracker.addReport("node3", "node4");
  tracker.addReport("node3", "node5");
  tracker.addReport("node4", "node6");
  tracker.addReport("node5", "node6");
  tracker.addReport("node5", "node7");
  tracker.addReport("node6", "node7");
  tracker.addReport("node6", "node8");
  final Set<ReportForJson> reports = getAndDeserializeJson();
  // Ensure that node4 is not in the list since it was
  // tagged by just one peer and we already have 5 other nodes.
  assertFalse(isNodeInReports(reports, "node4"));
  // Remaining nodes should be in the list.
  assertTrue(isNodeInReports(reports, "node1"));
  assertTrue(isNodeInReports(reports, "node2"));
  assertTrue(isNodeInReports(reports, "node3"));
  assertTrue(isNodeInReports(reports, "node5"));
  assertTrue(isNodeInReports(reports, "node6"));
}