DataServiceRemapConfirmationDialogController extends AbstractController { public void cancel() { getDialog().dispose(); } DataServiceRemapConfirmationDialogController( DataServiceMeta dataService, List<String> remainingStepNames,
      DataServiceDelegate dataServiceDelegate ); void init(); @SuppressWarnings( "unused" ) // Bound via xul void remap(); void delete(); void cancel(); DataServiceRemapConfirmationDialog.Action getAction();  }
@Test public void testCancel() { DataServiceDelegate delegate = mock( DataServiceDelegate.class ); DataServiceRemapConfirmationDialogController controller = spy( new DataServiceRemapConfirmationDialogController( mock( DataServiceMeta.class ), Arrays.asList( "Step1" ), delegate ) ); SwtDialog dialog = mock( SwtDialog.class ); doReturn( dialog ).when( controller ).getElementById( anyString() ); controller.cancel(); verify( dialog ).dispose(); }