public class EventTest {
@Test
public void testCompareTo1() {
PriorityQueue<Event> queue = new PriorityQueue<Event>();
queue.add(new Event(1) {
@Override
public void happen(EventSimulator simulator) {
}
});
queue.add(new Event(2) {
@Override
public void happen(EventSimulator simulator) {
}
});
assertEquals(1, queue.poll().scheduledTime);