DataUserMasterResource extends AbstractDataResource { @DELETE @Path("users/{objectId}") public void removeById(@PathParam("objectId") String idStr) { ObjectId id = ObjectId.parse(idStr); getUserMaster().removeById(id); } DataUserMasterResource(final UserMaster userMaster); UserMaster getUserMaster(); @GET Response getHateaos(@Context UriInfo uriInfo); @HEAD @Path("users") Response status(); @POST @Path("userSearches") Response search(UserSearchRequest request); @POST @Path("users") Response add(@Context UriInfo uriInfo, ManageableUser user); @GET @Path("users/{objectId}") Response getById(@PathParam("objectId") String idStr); @PUT @Path("users/{objectId}") Response updateById(@Context UriInfo uriInfo, @PathParam("objectId") String idStr, ManageableUser user); @DELETE @Path("users/{objectId}") void removeById(@PathParam("objectId") String idStr); @GET @Path("users/{objectId}/eventHistory") Response eventHistoryById(@PathParam("objectId") String idStr); @GET @Path("users/exists/{userName}") Response nameExists(@PathParam("userName") String userName); @GET @Path("users/name/{userName}") Response getByName(@PathParam("userName") String userName); @PUT @Path("users/name/{userName}") Response updateByName(@Context UriInfo uriInfo, @PathParam("userName") String userName, ManageableUser user); @DELETE @Path("users/name/{userName}") void removeByName(@PathParam("userName") String userName); @GET @Path("users/name/{userName}/eventHistory") Response eventHistoryByName(@PathParam("userName") String userName); @GET @Path("users/name/{userName}/account") Response accountByName(@PathParam("userName") String userName); static URI uriSearch(URI baseUri); static URI uriAdd(URI baseUri); static URI uriUserById(URI baseUri, ObjectIdentifiable objectId); static URI uriUserByName(URI baseUri, String userName); static URI uriNameExists(URI baseUri, String userName); static URI uriEventHistory(URI baseUri, UserEventHistoryRequest request); static URI uriUserAccountByName(URI baseUri, String userName);  }
@Test public void testRemoveUserById() { _resource.removeById(OID.toString()); verify(_underlying).removeById(OID); }