Event { abstract Event normalize(); Event();   }
@Test public void testNormalize() { Event expected, event; expected = Events.with(3); event = Events.with(2, Events.with(1), Events.with(1)); assertEquals(expected, event.normalize()); expected = Events.with(4, Events.with(0, Events.with(1), Events.with(0)), Events.with(1)); event = Events.with(2, Events.with(2, Events.with(1), Events.with(0)), Events.with(3)); assertEquals(expected, event.normalize()); }
@Test public void testNormalize_NormalizedEvents() { assertEquals(event1, event1.normalize()); assertEquals(event2, event2.normalize()); }