@Test
public void selectInListAndClickOKButton() throws Exception {

    Future<CoordinateReferenceSystem> future = showDialog();
    final int index = rand.nextInt(CODES.size());
    windowFixture.list().clickItem(index);
    windowFixture.robot.waitForIdle();
    getButton("OK").click();
    windowFixture.robot.waitForIdle();
    CoordinateReferenceSystem crs = retrieveCRS(future);
    assertNotNull(crs);
    // Compare return value to list selection
    CoordinateReferenceSystem expected = FACTORY.createCoordinateReferenceSystem(
            JCRSChooser.DEFAULT_AUTHORITY + ":" + CODES.get(index));
    assertTrue(CRS.equalsIgnoreMetadata(expected, crs));
}