@Test public void uploadPatientData() throws Exception { Patient patient = TestPLCEntityFactory.createPatient(); String guid = patientResource.registerPatient(patient); assertNotNull(guid); PatientAccount patientAccount = TestPLCEntityFactory.createPatientAccount(); patientAccount.setGuid(guid); when(patientAccountDao.getByGuid(anyString())).thenReturn(patientAccount); PatientData pd = TestPLCEntityFactory.createPatientData(); patientResource.uploadPatientData(guid, pd); }
@Path("{guid}") @POST @Consumes(MediaType.APPLICATION_JSON) public void uploadPatientData(@PathParam("guid") String guid, PatientData patientData) { patientDataService.addPatientData(guid, patientData); }
PatientResource { @Path("{guid}") @POST @Consumes(MediaType.APPLICATION_JSON) public void uploadPatientData(@PathParam("guid") String guid, PatientData patientData) { patientDataService.addPatientData(guid, patientData); } }
PatientResource { @Path("{guid}") @POST @Consumes(MediaType.APPLICATION_JSON) public void uploadPatientData(@PathParam("guid") String guid, PatientData patientData) { patientDataService.addPatientData(guid, patientData); } @Inject  PatientResource(PatientInformationService service, PatientDataService patientDataService); }
PatientResource { @Path("{guid}") @POST @Consumes(MediaType.APPLICATION_JSON) public void uploadPatientData(@PathParam("guid") String guid, PatientData patientData) { patientDataService.addPatientData(guid, patientData); } @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); }
PatientResource { @Path("{guid}") @POST @Consumes(MediaType.APPLICATION_JSON) public void uploadPatientData(@PathParam("guid") String guid, PatientData patientData) { patientDataService.addPatientData(guid, patientData); } @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);  }