AuditService extends EndpointService { public Audit getAudit(BigInteger id) throws IOException, TokenExpiredException { String requestUrl = RESOURCE + "/" + id.toString(); ArgusResponse response = getClient().executeHttpRequest(ArgusHttpClient.RequestType.GET, requestUrl, null); assertValidResponse(response, requestUrl); return fromJson(response.getResult(), Audit.class); } AuditService(ArgusHttpClient client); List<Audit> getAuditsForEntity(BigInteger entityId); Audit getAudit(BigInteger id);  }
@Test public void testGetAudit() throws IOException, TokenExpiredException { try(ArgusService argusService = new ArgusService(getMockedClient("/AuditServiceTest.json"))) { AuditService auditService = argusService.getAuditService(); Audit result = auditService.getAudit(BigInteger.ONE); Audit expected = _constructPersistedAudit(); assertEquals(expected, result); } }