DataServiceRemapNoStepsDialogController extends AbstractController { public void close() { getDialog().dispose(); } DataServiceRemapNoStepsDialogController(); void close();  }
@Test public void testController() { SwtDialog dialog = mock( SwtDialog.class ); DataServiceRemapNoStepsDialogController controller = spy( new DataServiceRemapNoStepsDialogController() ); Assert.hasText( controller.getName() ); doReturn( dialog ).when( controller ).getElementById( anyString() ); controller.close(); verify( dialog ).dispose(); }