DataMarketDataSnapshotResource extends AbstractDocumentDataResource<MarketDataSnapshotDocument> { @GET public Response get(@QueryParam("versionAsOf") String versionAsOf, @QueryParam("correctedTo") String correctedTo) { return super.get(versionAsOf, correctedTo); } DataMarketDataSnapshotResource();  DataMarketDataSnapshotResource(final DataMarketDataSnapshotMasterResource snapshotsResource, final ObjectId snapshotId); DataMarketDataSnapshotMasterResource getMarketDataSnapshotsResource(); ObjectId getUrlId(); MarketDataSnapshotMaster 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, MarketDataSnapshotDocument 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<MarketDataSnapshotDocument> replacementDocuments); @PUT Response replaceVersions(List<MarketDataSnapshotDocument> replacementDocuments); @PUT @Path("all") Response replaceAllVersions(List<MarketDataSnapshotDocument> replacementDocuments);  }
@Test public void testGetMarketDataSnapshot() { final ManageableMarketDataSnapshot target = new ManageableMarketDataSnapshot(); target.setBasisViewName("Basis"); final MarketDataSnapshotDocument result = new MarketDataSnapshotDocument(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()); }