@Test public void getEnvironmentSupportedVersionsTest() throws Exception { cloudHubDeployment.setUri(BASE_URI); validatorSpy = spy(new CloudHubDeploymentValidator(cloudHubDeployment)); CloudHubClient clientSpy = spy(new CloudHubClient(cloudHubDeployment, LOG_MOCK)); doReturn(clientSpy).when(validatorSpy, "getCloudHubClient"); doReturn(supportedVersions).when(clientSpy).getSupportedMuleVersions(); assertThat("Supported version that was generated is not the expected", validatorSpy.getEnvironmentSupportedVersions(), equalTo(expectedEnvironmentSupportedVersions)); }
@Override public EnvironmentSupportedVersions getEnvironmentSupportedVersions() throws DeploymentException { CloudHubClient client = getCloudHubClient(); List<SupportedVersion> supportedMuleVersions = client.getSupportedMuleVersions(); return new EnvironmentSupportedVersions(supportedMuleVersions.stream().map(sv -> sv.getVersion()) .collect(Collectors.toSet())); }
CloudHubDeploymentValidator extends AbstractDeploymentValidator { @Override public EnvironmentSupportedVersions getEnvironmentSupportedVersions() throws DeploymentException { CloudHubClient client = getCloudHubClient(); List<SupportedVersion> supportedMuleVersions = client.getSupportedMuleVersions(); return new EnvironmentSupportedVersions(supportedMuleVersions.stream().map(sv -> sv.getVersion()) .collect(Collectors.toSet())); } }
CloudHubDeploymentValidator extends AbstractDeploymentValidator { @Override public EnvironmentSupportedVersions getEnvironmentSupportedVersions() throws DeploymentException { CloudHubClient client = getCloudHubClient(); List<SupportedVersion> supportedMuleVersions = client.getSupportedMuleVersions(); return new EnvironmentSupportedVersions(supportedMuleVersions.stream().map(sv -> sv.getVersion()) .collect(Collectors.toSet())); } CloudHubDeploymentValidator(Deployment deployment); }
CloudHubDeploymentValidator extends AbstractDeploymentValidator { @Override public EnvironmentSupportedVersions getEnvironmentSupportedVersions() throws DeploymentException { CloudHubClient client = getCloudHubClient(); List<SupportedVersion> supportedMuleVersions = client.getSupportedMuleVersions(); return new EnvironmentSupportedVersions(supportedMuleVersions.stream().map(sv -> sv.getVersion()) .collect(Collectors.toSet())); } CloudHubDeploymentValidator(Deployment deployment); @Override EnvironmentSupportedVersions getEnvironmentSupportedVersions(); }
CloudHubDeploymentValidator extends AbstractDeploymentValidator { @Override public EnvironmentSupportedVersions getEnvironmentSupportedVersions() throws DeploymentException { CloudHubClient client = getCloudHubClient(); List<SupportedVersion> supportedMuleVersions = client.getSupportedMuleVersions(); return new EnvironmentSupportedVersions(supportedMuleVersions.stream().map(sv -> sv.getVersion()) .collect(Collectors.toSet())); } CloudHubDeploymentValidator(Deployment deployment); @Override EnvironmentSupportedVersions getEnvironmentSupportedVersions();  }