@Test
public void listenerInformedWhenDialogIsClosedViaSystemButton() throws Exception {

    Connection conn = showDialog(TITLE).get();
    final CountDownLatch latch = new CountDownLatch(1);
    conn.addListener(new TextReporterListener() {
        @Override
        public void onReporterClosed() {
            latch.countDown();
        }
        @Override
        public void onReporterUpdated() {}
    });
    windowFixture.close();
    assertTrue( latch.await(LISTENER_TIMEOUT, TimeUnit.MILLISECONDS) );
}