// Create treasure test.
TestResultTreasure treasure = new TestResultTreasure();
// Add 2-set of results.
List<ITestActionResult> res1 = new ArrayList<ITestActionResult>();
res1.add(new TestActionResult());
res1.add(new TestActionResult());
treasure.addTestResults(res1, new HostId("localhost:15908"));
// Add 3-set of results.
List<ITestActionResult> res2 = new ArrayList<ITestActionResult>();
res2.add(new TestActionResult());
res2.add(new TestActionResult());
res2.add(new TestActionResult());
treasure.addTestResults(res2, new HostId("localhost:15908"));
// See whether all results arrived.
final int agentCount = treasure.getAgentCount();
assertEquals(2, agentCount);