ResearcherResource { @RolesAllowed({OAuthToken.RESEARCHER_ROLE }) @POST @Path("shared") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) public DownloadDetails requestData(Filter filter) { return patientDataService.getDownloadDetails(filter); } @Inject  ResearcherResource(ResearchEntityDao researchEntityDao, TokenDao tokenDao,
            PatientDataService patientDataService, PLCApplicationResources appResources); @RolesAllowed({OAuthToken.PLC_ROLE }) @POST @Path("qualification_request") @Produces(MediaType.TEXT_PLAIN) @Consumes(MediaType.APPLICATION_JSON) String qualificationRequest(ResearchEntity re); @RolesAllowed({OAuthToken.RESEARCHER_ROLE }) @POST @Path("shared/summary") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) Summary dataSummary(Filter filter); @RolesAllowed({OAuthToken.RESEARCHER_ROLE }) @POST @Path("shared") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) DownloadDetails requestData(Filter filter); @Path("shared/download/{fileName}") @RolesAllowed({OAuthToken.RESEARCHER_ROLE }) @GET Response downloadPatientData(@PathParam("fileName") final String fileName);  }
@Test public void requestData() { DownloadDetails details = researcherResource.requestData(new Filter()); assertNotNull(details); }