### Question:
ProvisionerRestClient extends RestClient implements ProvisionerClient { @Override public Provisioner getProvisioner(String provisionerId) throws IOException { return getSingle(PROVISIONER_URL_SUFFIX, provisionerId, Provisioner.class); } ProvisionerRestClient(Supplier<RestClientConnectionConfig> config, CloseableHttpClient httpClient);  ProvisionerRestClient(Supplier<RestClientConnectionConfig> config, CloseableHttpClient httpClient, Gson gson); @Override List<Provisioner> getAllProvisioners(); @Override Provisioner getProvisioner(String provisionerId);  }### Answer:
@Test public void testGetProvisionerSuccess() throws IOException { Provisioner result = provisionerClient.getProvisioner(PROVISIONER.getId()); assertEquals(PROVISIONER, result); }
@Test public void testGetProvisionerNotFound() throws IOException { clientManager = createClientManager(TestStatusUserId.NOT_FOUND_STATUS_USER_ID.getValue()); provisionerClient = clientManager.getProvisionerClient(); try { provisionerClient.getProvisioner(PROVISIONER.getId()); Assert.fail("Expected HttpFailureException"); } catch (HttpFailureException e) { Assert.assertEquals(HttpStatus.SC_NOT_FOUND, e.getStatusCode()); } }
@Test public void testGetProvisionerConflict() throws IOException { clientManager = createClientManager(TestStatusUserId.CONFLICT_STATUS_USER_ID.getValue()); provisionerClient = clientManager.getProvisionerClient(); try { provisionerClient.getProvisioner(PROVISIONER.getId()); Assert.fail("Expected HttpFailureException"); } catch (HttpFailureException e) { Assert.assertEquals(HttpStatus.SC_CONFLICT, e.getStatusCode()); } }