@Test void testComputeSpaceId() { Mockito.when(client.getSpace(ORG_NAME, SPACE_NAME, false)) .thenReturn(createCloudSpace(GUID, SPACE_NAME, ORG_NAME)); String spaceId = clientHelper.computeSpaceId(ORG_NAME, SPACE_NAME); Assertions.assertEquals(GUID.toString(), spaceId); }
public String computeSpaceId(String orgName, String spaceName) { CloudSpace space = client.getSpace(orgName, spaceName, false); if (space != null) { return space.getMetadata() .getGuid() .toString(); } return null; }
ClientHelper { public String computeSpaceId(String orgName, String spaceName) { CloudSpace space = client.getSpace(orgName, spaceName, false); if (space != null) { return space.getMetadata() .getGuid() .toString(); } return null; } }
ClientHelper { public String computeSpaceId(String orgName, String spaceName) { CloudSpace space = client.getSpace(orgName, spaceName, false); if (space != null) { return space.getMetadata() .getGuid() .toString(); } return null; } ClientHelper(CloudControllerClient client); }
ClientHelper { public String computeSpaceId(String orgName, String spaceName) { CloudSpace space = client.getSpace(orgName, spaceName, false); if (space != null) { return space.getMetadata() .getGuid() .toString(); } return null; } ClientHelper(CloudControllerClient client); void deleteRoute(String uri); String computeSpaceId(String orgName, String spaceName); CloudTarget computeTarget(String spaceId); }
ClientHelper { public String computeSpaceId(String orgName, String spaceName) { CloudSpace space = client.getSpace(orgName, spaceName, false); if (space != null) { return space.getMetadata() .getGuid() .toString(); } return null; } ClientHelper(CloudControllerClient client); void deleteRoute(String uri); String computeSpaceId(String orgName, String spaceName); CloudTarget computeTarget(String spaceId);  }