@Test
public void okButtonStateWithListSize() throws Exception {

    showDialog();
    JButtonFixture button = getButton("OK");
    // Filter to a single item - button should be enabled
    JTextComponentFixture textBox = windowFixture.textBox();
    textBox.enterText(UNIQUE_FILTER_STRING);
    windowFixture.robot.waitForIdle();
    button.requireEnabled();
    // Remove filter (no list selection) - button should be disabled
    textBox.deleteText();
    windowFixture.robot.waitForIdle();
    windowFixture.list().requireNoSelection();
    button.requireDisabled();
}