PatientResource { @POST @Produces(MediaType.TEXT_PLAIN) @Consumes(MediaType.APPLICATION_JSON) public String registerPatient(Patient patient) { PatientAccount patientAccount = new PatientAccount(patient); return patientInformationService.registerPatient(patientAccount); } @Inject  PatientResource(PatientInformationService service, PatientDataService patientDataService); @POST @Produces(MediaType.TEXT_PLAIN) @Consumes(MediaType.APPLICATION_JSON) String registerPatient(Patient patient); @Path("{guid}") @POST @Consumes(MediaType.APPLICATION_JSON) void uploadPatientData(@PathParam("guid") String guid, PatientData patientData);  }
@Test public void registerPatient() throws Exception { Patient patient = TestPLCEntityFactory.createPatient(); String guid = patientResource.registerPatient(patient); assertNotNull(guid); assertEquals(EXPECTED_GUID_LENGTH, guid.length()); }