public void testMinimizeFrame() {
Dimension size = new Dimension(10, 20);
frame.setUI(ui);
frame.setSize(size);
frame.setMaximizable(true);
JDesktopPane desktop = new JDesktopPane();
desktop.setSize(new Dimension(100, 200));
desktop.add(frame);
try {
frame.setMaximum(true);
} catch (PropertyVetoException e) {
assertTrue("exception", false);
}
assertTrue("size changed", frame.getSize().equals(desktop.getSize()));
frame.setMaximizable(false);
ui.minimizeFrame(frame);
assertFalse("minimized", frame.getSize().equals(desktop.getSize()));
}