DataConventionResource extends AbstractDocumentDataResource<ConventionDocument> { @GET public Response get(@QueryParam("versionAsOf") String versionAsOf, @QueryParam("correctedTo") String correctedTo) { return super.get(versionAsOf, correctedTo); } DataConventionResource();  DataConventionResource(final DataConventionMasterResource conventionsResource, final ObjectId conventionId); DataConventionMasterResource getConventionsResource(); ObjectId getUrlId(); ConventionMaster 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, ConventionDocument 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<ConventionDocument> replacementDocuments); @PUT Response replaceVersions(List<ConventionDocument> replacementDocuments); @PUT @Path("all") Response replaceAllVersions(List<ConventionDocument> replacementDocuments);  }
@Test public void testGetConvention() { final ManageableConvention target = new MockConvention("Test", ExternalIdBundle.of("A", "B"), Currency.GBP); final ConventionDocument result = new ConventionDocument(target); when(_underlying.get(OID, VersionCorrection.LATEST)).thenReturn(result); Response test = _resource.get(null, null); assertEquals(Status.OK.getStatusCode(), test.getStatus()); assertSame(result, test.getEntity()); }