BatchService extends EndpointService { public Map<String, String> getBatches() throws IOException, TokenExpiredException { String requestUrl = RESOURCE; ArgusResponse response = getClient().executeHttpRequest(ArgusHttpClient.RequestType.GET, requestUrl, null); assertValidResponse(response, requestUrl); return fromJson(response.getResult(), new TypeReference<Map<String, String>>() { }); } BatchService(ArgusHttpClient client); BigInteger createBatch(List<String> expressions, int ttl); void deleteBatch(BigInteger batchId); Batch getBatch(BigInteger batchId); Map<String, String> getBatches();  }
@Test public void testGetBatches() throws IOException, TokenExpiredException { try(ArgusService argusService = new ArgusService(getMockedClient("/BatchServiceTest.json"))) { BatchService batchService = argusService.getBatchService(); Map<String, String> result = batchService.getBatches(); Map<String, String> expected = new HashMap<>(); expected.put("1", "QUEUED"); assertEquals(expected, result); } }