ResourceType resourceType = new ResourceType("foo", "foo", ResourceCategory.PLATFORM, null);
Resource resource = new Resource(1);
EventDefinition eventDefinition = new EventDefinition(resourceType, "foo");
EventSource eventSource = new EventSource("foo", eventDefinition, resource);
EventReport report = new EventReport(2, 2);
report.addEvent(new Event("foo", "foo", 0, EventSeverity.DEBUG, ""), eventSource);
assert ensureSerializable(report).getEvents().size() == 1;
report.addEvent(new Event("foo", "foo", 1, EventSeverity.DEBUG, ""), eventSource);
assert ensureSerializable(report).getEvents().size() == 1; // only one event source still!
assert ensureSerializable(report).getEvents().values().iterator().next().size() == 2;
}