}
@Test
public void should_return_iconified_JInternalFrames_if_Component_is_JDesktopPane() {
ScreenLock.instance().acquire(this);
final TestMdiWindow window = createAndShowNewWindow(getClass());
iconify(window.internalFrame());
Collection<Component> children = execute(new GuiQuery<Collection<Component>>() {
@Override
protected Collection<Component> executeInEDT() {
return finder.nonExplicitChildrenOf(window.desktop());
}
});
try {
assertThat(children).containsOnly(window.internalFrame());
} finally {
try {
window.destroy();
} finally {
ScreenLock.instance().release(this);
}
}
}