DriverDetailsDialog { void close() { getDialog().dispose(); } DriverDetailsDialog( Shell parent );  static final String XUL_DIALOG_ID; }
@Test public void testClose() throws Exception { DriverDetailsDialog dialog = mock( DriverDetailsDialog.class ); doCallRealMethod().when( dialog ).close(); SwtDialog swtDialog = mock( SwtDialog.class ); doReturn( swtDialog ).when( dialog ).getDialog(); dialog.close(); verify( dialog ).getDialog(); verify( swtDialog ).dispose(); }