### Question:
AdminRestClient extends RestClient implements AdminClient { @Override public List<ImageType> getAllImageTypes() throws IOException { return getAll(IMAGE_TYPES_URL_SUFFIX, IMAGE_TYPES_LIST_TYPE); } AdminRestClient(Supplier<RestClientConnectionConfig> config, CloseableHttpClient httpClient);  AdminRestClient(Supplier<RestClientConnectionConfig> config, CloseableHttpClient httpClient, Gson gson); @Override List<ClusterTemplate> getAllClusterTemplates(); @Override ClusterTemplate getClusterTemplate(String name); @Override void deleteClusterTemplate(String name); @Override List<PartialTemplate> getAllPartialTemplates(); @Override PartialTemplate getPartialTemplate(String name); @Override void deletePartialTemplate(String name); @Override List<Provider> getAllProviders(); @Override Provider getProvider(String name); @Override void deleteProvider(String name); @Override List<Service> getAllServices(); @Override Service getService(String name); @Override void deleteService(String name); @Override List<HardwareType> getAllHardwareTypes(); @Override HardwareType getHardwareType(String name); @Override void deleteHardwareType(String name); @Override List<ImageType> getAllImageTypes(); @Override ImageType getImageType(String name); @Override void deleteImageType(String name);  }### Answer:
@Test public void testGetAllImageTypesSuccess() throws IOException { List<ImageType> result = adminClient.getAllImageTypes(); assertTrue(result.contains(Entities.ImageTypeExample.CENTOS_6)); assertTrue(result.contains(Entities.ImageTypeExample.UBUNTU_12)); }
@Test public void testGetAllImageTypesBadRequest() throws IOException { clientManager = createClientManager(TestStatusUserId.BAD_REQUEST_STATUS_USER_ID.getValue()); adminClient = clientManager.getAdminClient(); try { adminClient.getAllImageTypes(); Assert.fail("Expected HttpFailureException"); } catch (HttpFailureException e) { Assert.assertEquals(HttpStatus.SC_BAD_REQUEST, e.getStatusCode()); } }