StandaloneArtifactDeployer implements ArtifactDeployer { @Override public void deployApplication() throws DeploymentException { renameApplicationToApplicationName(); addDomainFromstandaloneDeployment(deployment); File application = deployment.getArtifact(); checkState(application != null, "Application cannot be null"); try { controller.deploy(application.getAbsolutePath()); } catch (MuleControllerException e) { log.error("Couldn't deploy application: " + application); throw new DeploymentException("Couldn't deploy application: " + application); } } StandaloneArtifactDeployer(Deployment deployment, MuleProcessController controller, DeployerLog log, Prober prober);  StandaloneArtifactDeployer(Deployment deployment, DeployerLog log); void waitForDeployments(); void verifyMuleIsStarted(); void addDomainFromstandaloneDeployment(StandaloneDeployment configuration); @Override String toString(); @Override void deployDomain(); @Override void undeployDomain(); @Override void deployApplication(); @Override void undeployApplication();  }
@Test(expected = IllegalStateException.class) public void deployApplicationNullFileTest() throws DeploymentException { doReturn(null).when(deploymentMock).getArtifact(); deployerSpy.deployApplication(); }
@Test public void deployApplicationTest() throws DeploymentException { deployerSpy.deployApplication(); verify(controllerMock, times(1)).deploy(artifactFile.getAbsolutePath()); }
@Test(expected = DeploymentException.class) public void deployApplicationMuleControllerExceptionTest() throws DeploymentException { doThrow(new MuleControllerException()).when(controllerMock).deploy(artifactFile.getAbsolutePath()); deployer.deployApplication(); }