### Question:
AdminRestClient extends RestClient implements AdminClient { @Override public Service getService(String name) throws IOException { return getSingle(SERVICES_URL_SUFFIX, name, Service.class); } 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 testGetServiceSuccess() throws IOException { Service result = adminClient.getService(DATA_NODE_SERVICE_NAME); assertTrue(result.equals(Entities.ServiceExample.DATANODE)); }
@Test public void testGetServiceMethodNotAllowed() throws IOException { clientManager = createClientManager(TestStatusUserId.METHOD_NOT_ALLOWED_STATUS_USER_ID.getValue()); adminClient = clientManager.getAdminClient(); try { adminClient.getService(DATA_NODE_SERVICE_NAME); Assert.fail("Expected HttpFailureException"); } catch (HttpFailureException e) { Assert.assertEquals(HttpStatus.SC_METHOD_NOT_ALLOWED, e.getStatusCode()); } }