@Test public void shouldGetShipmentFileTemplate() { EDIFileTemplate expectedShipmentFileTemplate = new EDIFileTemplate(); when(shipmentFileTemplateService.get()).thenReturn(expectedShipmentFileTemplate); ResponseEntity<OpenLmisResponse> response = controller.get(); assertThat((EDIFileTemplate) response.getBody().getData().get("shipment_template"), is(expectedShipmentFileTemplate)); verify(shipmentFileTemplateService).get(); }
@RequestMapping(value = "/shipment-file-template", method = GET) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'SYSTEM_SETTINGS')") public ResponseEntity<OpenLmisResponse> get() { return response("shipment_template", service.get()); }
ShipmentFileTemplateController extends BaseController { @RequestMapping(value = "/shipment-file-template", method = GET) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'SYSTEM_SETTINGS')") public ResponseEntity<OpenLmisResponse> get() { return response("shipment_template", service.get()); } }
ShipmentFileTemplateController extends BaseController { @RequestMapping(value = "/shipment-file-template", method = GET) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'SYSTEM_SETTINGS')") public ResponseEntity<OpenLmisResponse> get() { return response("shipment_template", service.get()); }  }
ShipmentFileTemplateController extends BaseController { @RequestMapping(value = "/shipment-file-template", method = GET) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'SYSTEM_SETTINGS')") public ResponseEntity<OpenLmisResponse> get() { return response("shipment_template", service.get()); }  @RequestMapping(value = "/shipment-file-template", method = GET) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'SYSTEM_SETTINGS')") ResponseEntity<OpenLmisResponse> get(); @RequestMapping(value = "/shipment-file-template", method = POST, headers = ACCEPT_JSON) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'SYSTEM_SETTINGS')") ResponseEntity<OpenLmisResponse> update(@RequestBody EDIFileTemplate shipmentFileTemplate,
                                                 HttpServletRequest request); }
ShipmentFileTemplateController extends BaseController { @RequestMapping(value = "/shipment-file-template", method = GET) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'SYSTEM_SETTINGS')") public ResponseEntity<OpenLmisResponse> get() { return response("shipment_template", service.get()); }  @RequestMapping(value = "/shipment-file-template", method = GET) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'SYSTEM_SETTINGS')") ResponseEntity<OpenLmisResponse> get(); @RequestMapping(value = "/shipment-file-template", method = POST, headers = ACCEPT_JSON) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'SYSTEM_SETTINGS')") ResponseEntity<OpenLmisResponse> update(@RequestBody EDIFileTemplate shipmentFileTemplate,
                                                 HttpServletRequest request);  }