NamespaceService extends EndpointService { public Namespace updateNamespace(BigInteger id, Namespace namespace) throws IOException, TokenExpiredException { String requestUrl = RESOURCE + "/" + id.toString(); ArgusResponse response = getClient().executeHttpRequest(ArgusHttpClient.RequestType.PUT, requestUrl, namespace); assertValidResponse(response, requestUrl); return fromJson(response.getResult(), Namespace.class); } NamespaceService(ArgusHttpClient client); List<Namespace> getNamespaces(); Namespace createNamespace(Namespace namespace); Namespace updateNamespace(BigInteger id, Namespace namespace); Namespace updateNamespaceMembers(BigInteger id, Set<String> users);  }
@Test public void testUpdateNamespace() throws IOException, TokenExpiredException { try(ArgusService argusService = new ArgusService(getMockedClient("/NamespaceServiceTest.json"))) { NamespaceService namespaceService = argusService.getNamespaceService(); Namespace result = namespaceService.updateNamespace(BigInteger.ONE, _constructUpdatedNamespace()); Namespace expected = _constructUpdatedNamespace(); assertEquals(expected, result); } }