DataSecurityResource extends AbstractDocumentDataResource<SecurityDocument> { @GET public Response get(@QueryParam("versionAsOf") String versionAsOf, @QueryParam("correctedTo") String correctedTo) { return super.get(versionAsOf, correctedTo); } DataSecurityResource();  DataSecurityResource(final DataSecurityMasterResource securitiesResource, final ObjectId securityId); DataSecurityMasterResource getSecuritiesResource(); ObjectId getUrlId(); SecurityMaster getMaster(); @GET @Path("versions") Response history(@Context UriInfo uriInfo); @GET Response get(@QueryParam("versionAsOf") String versionAsOf, @QueryParam("correctedTo") String correctedTo); @POST Response update(@Context UriInfo uriInfo, SecurityDocument request); @DELETE void remove(); @GET @Path("versions/{versionId}") Response getVersioned(@PathParam("versionId") String versionId); @PUT @Path("versions/{versionId}") Response replaceVersion(@PathParam("versionId") String versionId, List<SecurityDocument> replacementDocuments); @PUT Response replaceVersions(List<SecurityDocument> replacementDocuments); @PUT @Path("all") Response replaceAllVersions(List<SecurityDocument> replacementDocuments);  }
@Test public void testGetSecurity() { final ManageableSecurity security = new ManageableSecurity(null, "Name", "Type", ExternalIdBundle.of("C", "D")); final SecurityDocument result = new SecurityDocument(security); when(_underlying.get(OID, VersionCorrection.LATEST)).thenReturn(result); Response test = _resource.get(null, null); assertEquals(Status.OK.getStatusCode(), test.getStatus()); assertSame(result, test.getEntity()); }