@Test public void undeployExistentApplication() throws DeploymentException { applicationDeployer.undeploy(); verify(artifactDeployerMock, times(1)).undeployApplication(); verify(artifactDeployerMock, times(0)).isFailIfNotExists(); verify(logMock, times(0)).error(anyString()); }
@Override public void undeploy() throws DeploymentException { try { armArtifactDeployer.undeployApplication(); } catch (NotFoundException e) { if (armArtifactDeployer.isFailIfNotExists()) { throw e; } else { log.error("Application not found: " + armArtifactDeployer.getApplicationName()); } } }
ArmApplicationDeployer implements Deployer { @Override public void undeploy() throws DeploymentException { try { armArtifactDeployer.undeployApplication(); } catch (NotFoundException e) { if (armArtifactDeployer.isFailIfNotExists()) { throw e; } else { log.error("Application not found: " + armArtifactDeployer.getApplicationName()); } } } }
ArmApplicationDeployer implements Deployer { @Override public void undeploy() throws DeploymentException { try { armArtifactDeployer.undeployApplication(); } catch (NotFoundException e) { if (armArtifactDeployer.isFailIfNotExists()) { throw e; } else { log.error("Application not found: " + armArtifactDeployer.getApplicationName()); } } } ArmApplicationDeployer(Deployment deployment, DeployerLog log); protected  ArmApplicationDeployer(ArmArtifactDeployer deployer, DeployerLog log); }
ArmApplicationDeployer implements Deployer { @Override public void undeploy() throws DeploymentException { try { armArtifactDeployer.undeployApplication(); } catch (NotFoundException e) { if (armArtifactDeployer.isFailIfNotExists()) { throw e; } else { log.error("Application not found: " + armArtifactDeployer.getApplicationName()); } } } ArmApplicationDeployer(Deployment deployment, DeployerLog log); protected  ArmApplicationDeployer(ArmArtifactDeployer deployer, DeployerLog log); @Override void deploy(); @Override void undeploy(); }
ArmApplicationDeployer implements Deployer { @Override public void undeploy() throws DeploymentException { try { armArtifactDeployer.undeployApplication(); } catch (NotFoundException e) { if (armArtifactDeployer.isFailIfNotExists()) { throw e; } else { log.error("Application not found: " + armArtifactDeployer.getApplicationName()); } } } ArmApplicationDeployer(Deployment deployment, DeployerLog log); protected  ArmApplicationDeployer(ArmArtifactDeployer deployer, DeployerLog log); @Override void deploy(); @Override void undeploy();  }