### Question:
ProvisionerRestClient extends RestClient implements ProvisionerClient { @Override public List<Provisioner> getAllProvisioners() throws IOException { return getAll(PROVISIONER_URL_SUFFIX, PROVISIONERS_LIST_TYPE); } 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 testGetAllProvisionersSuccess() throws IOException { List<Provisioner> result = provisionerClient.getAllProvisioners(); assertEquals(PROVISIONERS, result); }
@Test public void testGetAllProvisionersBadRequest() throws IOException { clientManager = createClientManager(TestStatusUserId.BAD_REQUEST_STATUS_USER_ID.getValue()); provisionerClient = clientManager.getProvisionerClient(); try { provisionerClient.getAllProvisioners(); Assert.fail("Expected HttpFailureException"); } catch (HttpFailureException e) { Assert.assertEquals(HttpStatus.SC_BAD_REQUEST, e.getStatusCode()); } }
@Test public void testGetAllProvisionersUnauthorized() throws IOException { clientManager = createClientManager(TestStatusUserId.UNAUTHORIZED_STATUS_USER_ID.getValue()); provisionerClient = clientManager.getProvisionerClient(); try { provisionerClient.getAllProvisioners(); Assert.fail("Expected UnauthorizedAccessTokenException"); } catch (UnauthorizedAccessTokenException ignored) { } }