### Question:
DeploymentPopup implements DeploymentPopupView.Presenter { @Override public void onCancel() { view.hide(); driver.cancel(); } @Inject  DeploymentPopup(DeploymentPopupView view); void show(Driver driver); @Override void onOk(); @Override void onCancel();  }### Answer:
@Test public void testOnCancel() { context = new BuildExecutionContext(CONTAINER1, CONTAINER1, null); context.setServerTemplate(template1); DefaultDeploymentPopupDriver driver = new DefaultDeploymentPopupDriver(context, DeploymentPopup.Mode.MULTIPLE_SERVER_FORCED, () -> templates, callback, cancelCallback); popup.show(driver); popup.onCancel(); verify(view).hide(); verify(cancelCallback).execute(); }