}
public void shouldAddNewWindowsToAndRemoveNewWindowsFromMiniMap() {
checkForHeadless();
Mock miniMapMock = mock(QueuedMiniMap.class);
WindowGrabber grabber = new WindowGrabber((QueuedMiniMap)miniMapMock);
JFrame frame = new JFrame();
frame.setName("frame.name");
miniMapMock.expects("put").with("frame.name", frame);
frame.setVisible(true);
miniMapMock.expects("remove").with("frame.name");
frame.dispose();
waitForIdle();
verifyMocks();
grabber.dispose();
}