@Test void testComputeTarget() { Mockito.when(client.getSpace(Matchers.any(UUID.class))) .thenReturn(createCloudSpace(GUID, SPACE_NAME, ORG_NAME)); CloudTarget target = clientHelper.computeTarget(SPACE_ID); Assertions.assertEquals(ORG_NAME, target.getOrganizationName()); Assertions.assertEquals(SPACE_NAME, target.getSpaceName()); }
public CloudTarget computeTarget(String spaceId) { CloudSpace space = attemptToFindSpace(spaceId); if (space != null) { return new CloudTarget(space.getOrganization() .getName(), space.getName()); } return null; }
ClientHelper { public CloudTarget computeTarget(String spaceId) { CloudSpace space = attemptToFindSpace(spaceId); if (space != null) { return new CloudTarget(space.getOrganization() .getName(), space.getName()); } return null; } }
ClientHelper { public CloudTarget computeTarget(String spaceId) { CloudSpace space = attemptToFindSpace(spaceId); if (space != null) { return new CloudTarget(space.getOrganization() .getName(), space.getName()); } return null; } ClientHelper(CloudControllerClient client); }
ClientHelper { public CloudTarget computeTarget(String spaceId) { CloudSpace space = attemptToFindSpace(spaceId); if (space != null) { return new CloudTarget(space.getOrganization() .getName(), space.getName()); } return null; } ClientHelper(CloudControllerClient client); void deleteRoute(String uri); String computeSpaceId(String orgName, String spaceName); CloudTarget computeTarget(String spaceId); }
ClientHelper { public CloudTarget computeTarget(String spaceId) { CloudSpace space = attemptToFindSpace(spaceId); if (space != null) { return new CloudTarget(space.getOrganization() .getName(), space.getName()); } return null; } ClientHelper(CloudControllerClient client); void deleteRoute(String uri); String computeSpaceId(String orgName, String spaceName); CloudTarget computeTarget(String spaceId);  }