### Question:
TenantRestClient extends RestClient implements TenantClient { @Override public TenantSpecification getTenant(String tenantName) throws IOException { return getSingle(TENANT_URL_SUFFIX, tenantName, TenantSpecification.class); } TenantRestClient(Supplier<RestClientConnectionConfig> config, CloseableHttpClient httpClient);  TenantRestClient(Supplier<RestClientConnectionConfig> config, CloseableHttpClient httpClient, Gson gson); @Override List<TenantSpecification> getTenants(); @Override TenantSpecification getTenant(String tenantName); @Override void deleteTenant(String tenantName);  }### Answer:
@Test public void testGetTenantSuccess() throws IOException { TenantSpecification result = tenantClient.getTenant(TENANT.getName()); assertEquals(TENANT, result); }
@Test public void testGetTenantNotFound() throws IOException { clientManager = createClientManager(TestStatusUserId.NOT_FOUND_STATUS_USER_ID.getValue()); tenantClient = clientManager.getTenantClient(); try { tenantClient.getTenant(TENANT.getName()); Assert.fail("Expected HttpFailureException"); } catch (HttpFailureException e) { Assert.assertEquals(HttpStatus.SC_NOT_FOUND, e.getStatusCode()); } }
@Test public void testGetTenantConflict() throws IOException { clientManager = createClientManager(TestStatusUserId.CONFLICT_STATUS_USER_ID.getValue()); tenantClient = clientManager.getTenantClient(); try { tenantClient.getTenant(TENANT.getName()); Assert.fail("Expected HttpFailureException"); } catch (HttpFailureException e) { Assert.assertEquals(HttpStatus.SC_CONFLICT, e.getStatusCode()); } }