@Test public void getEnvironmentSupportedVersionsTest() throws Exception { validatorSpy = spy(new AgentDeploymentValidator(new AgentDeployment())); AgentInfo agentInfo = new AgentInfo(); agentInfo.setMuleVersion(MULE_VERSION); AgentDeployment deploymentMock = mock(AgentDeployment.class); when(deploymentMock.getUri()).thenReturn(CLIENT_URI); AgentClient clientSpy = spy(new AgentClient(LOG_MOCK, deploymentMock)); doReturn(agentInfo).when(clientSpy).getAgentInfo(); doReturn(clientSpy).when(validatorSpy, "getAgentClient"); assertThat("Supported version that was generated is not the expected", validatorSpy.getEnvironmentSupportedVersions(), equalTo(EXPECTED_ENVIRONMENT_SUPPORTED_VERSIONS)); }
@Override public EnvironmentSupportedVersions getEnvironmentSupportedVersions() throws DeploymentException { AgentClient client = getAgentClient(); String muleRuntimeVersion = client.getAgentInfo().getMuleVersion(); return new EnvironmentSupportedVersions(muleRuntimeVersion); }
AgentDeploymentValidator extends AbstractDeploymentValidator { @Override public EnvironmentSupportedVersions getEnvironmentSupportedVersions() throws DeploymentException { AgentClient client = getAgentClient(); String muleRuntimeVersion = client.getAgentInfo().getMuleVersion(); return new EnvironmentSupportedVersions(muleRuntimeVersion); } }
AgentDeploymentValidator extends AbstractDeploymentValidator { @Override public EnvironmentSupportedVersions getEnvironmentSupportedVersions() throws DeploymentException { AgentClient client = getAgentClient(); String muleRuntimeVersion = client.getAgentInfo().getMuleVersion(); return new EnvironmentSupportedVersions(muleRuntimeVersion); } AgentDeploymentValidator(Deployment deployment); }
AgentDeploymentValidator extends AbstractDeploymentValidator { @Override public EnvironmentSupportedVersions getEnvironmentSupportedVersions() throws DeploymentException { AgentClient client = getAgentClient(); String muleRuntimeVersion = client.getAgentInfo().getMuleVersion(); return new EnvironmentSupportedVersions(muleRuntimeVersion); } AgentDeploymentValidator(Deployment deployment); @Override EnvironmentSupportedVersions getEnvironmentSupportedVersions(); }
AgentDeploymentValidator extends AbstractDeploymentValidator { @Override public EnvironmentSupportedVersions getEnvironmentSupportedVersions() throws DeploymentException { AgentClient client = getAgentClient(); String muleRuntimeVersion = client.getAgentInfo().getMuleVersion(); return new EnvironmentSupportedVersions(muleRuntimeVersion); } AgentDeploymentValidator(Deployment deployment); @Override EnvironmentSupportedVersions getEnvironmentSupportedVersions();  }