Test that clicking the minimize button iconifies the window.
Automatic in Swing but not necessarily in the AWT.
public void testMinimizeButton() throws AWTException {
frame.setVisible(true);
Point p = frame.getLocationOnScreen();
Robot r = new Robot();
r.setAutoWaitForIdle(true);
r.mouseMove(p.x+35, p.y+10);
r.mousePress(InputEvent.BUTTON1_MASK);
r.mouseRelease(InputEvent.BUTTON1_MASK);
r.delay(1000); // needs a couple of seconds for the state to update
int state = frame.getExtendedState();
assertEquals(Frame.ICONIFIED, state);
}