}
public void validate() {
for (MapViewChangedEvent expected : expectedEvents) {
Assert.assertFalse("Expected event " + expected + " but got nothing", actualEvents.isEmpty());
MapViewChangedEvent actual = actualEvents.remove(0);
Assert.assertEquals(expected.getScale(), actual.getScale(), delta);
Assert.assertTrue("Expected " + expected.getBounds() + " but was " + actual.getBounds()
+ " for precision " + (delta), expected.getBounds().equals(actual.getBounds(), delta));
Assert.assertEquals(expected.isSameScaleLevel(), actual.isSameScaleLevel());
}
Assert.assertTrue(actualEvents.size() + " unexpected events", actualEvents.isEmpty());
}