assertMoveImage(10, 0);
}
private void assertMoveImage(int dx, int dy) {
window.show(new Dimension(WIDTH, HEIGHT));
MapContent mapContent = createMapContent(createMatchedBounds(mapPane.getVisibleRect()));
// Wait for the display area and new map content events to be
// processed
listener.setExpected(MapPaneEvent.Type.DISPLAY_AREA_CHANGED);
listener.setExpected(MapPaneEvent.Type.NEW_MAPCONTENT);
mapPane.setMapContent(mapContent);
assertTrue(listener.await(MapPaneEvent.Type.DISPLAY_AREA_CHANGED, WAIT_TIMEOUT));
assertTrue(listener.await(MapPaneEvent.Type.NEW_MAPCONTENT, WAIT_TIMEOUT));
ReferencedEnvelope startEnv = mapContent.getViewport().getBounds();
listener.setExpected(MapPaneEvent.Type.DISPLAY_AREA_CHANGED);
mapPane.moveImage(dx, dy);
assertTrue(listener.await(MapPaneEvent.Type.DISPLAY_AREA_CHANGED, WAIT_TIMEOUT));