@Test public void shouldGetProgramProtocol() throws Exception { VaccineServiceConfigDTO dto = new VaccineServiceConfigDTO(); when(service.getProductDoseForProgram(1L)).thenReturn(dto); ResponseEntity<OpenLmisResponse> response = controller.getProgramProtocol(1L); assertThat(response.getBody().getData().get("protocol"), is(notNullValue())); }
@RequestMapping(value = "get/{programId}") public ResponseEntity<OpenLmisResponse> getProgramProtocol(@PathVariable Long programId) { VaccineServiceConfigDTO dto = service.getProductDoseForProgram(programId); return OpenLmisResponse.response(PROTOCOL, dto); }
ProductDoseController extends BaseController { @RequestMapping(value = "get/{programId}") public ResponseEntity<OpenLmisResponse> getProgramProtocol(@PathVariable Long programId) { VaccineServiceConfigDTO dto = service.getProductDoseForProgram(programId); return OpenLmisResponse.response(PROTOCOL, dto); } }
ProductDoseController extends BaseController { @RequestMapping(value = "get/{programId}") public ResponseEntity<OpenLmisResponse> getProgramProtocol(@PathVariable Long programId) { VaccineServiceConfigDTO dto = service.getProductDoseForProgram(programId); return OpenLmisResponse.response(PROTOCOL, dto); }  }
ProductDoseController extends BaseController { @RequestMapping(value = "get/{programId}") public ResponseEntity<OpenLmisResponse> getProgramProtocol(@PathVariable Long programId) { VaccineServiceConfigDTO dto = service.getProductDoseForProgram(programId); return OpenLmisResponse.response(PROTOCOL, dto); }  @RequestMapping(value = "get/{programId}") ResponseEntity<OpenLmisResponse> getProgramProtocol(@PathVariable Long programId); @RequestMapping(value = "save", headers = ACCEPT_JSON, method = RequestMethod.PUT) ResponseEntity<OpenLmisResponse> save(@RequestBody VaccineServiceConfigDTO config); }
ProductDoseController extends BaseController { @RequestMapping(value = "get/{programId}") public ResponseEntity<OpenLmisResponse> getProgramProtocol(@PathVariable Long programId) { VaccineServiceConfigDTO dto = service.getProductDoseForProgram(programId); return OpenLmisResponse.response(PROTOCOL, dto); }  @RequestMapping(value = "get/{programId}") ResponseEntity<OpenLmisResponse> getProgramProtocol(@PathVariable Long programId); @RequestMapping(value = "save", headers = ACCEPT_JSON, method = RequestMethod.PUT) ResponseEntity<OpenLmisResponse> save(@RequestBody VaccineServiceConfigDTO config); static final String PROTOCOL; }