### Question:
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);  }### Answer:
@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); }
@Test void testComputeSpaceIdIfSpaceIsNull() { Assertions.assertNull(clientHelper.computeSpaceId(ORG_NAME, SPACE_NAME)); }