@Test public void shouldGetBudgetFileTemplate() { EDIFileTemplate expectedBudgetFileTemplate = new EDIFileTemplate(); when(budgetFileTemplateService.get()).thenReturn(expectedBudgetFileTemplate); ResponseEntity<OpenLmisResponse> response = controller.get(); assertThat((EDIFileTemplate) response.getBody().getData().get("budget_template"), is(expectedBudgetFileTemplate)); verify(budgetFileTemplateService).get(); }
@RequestMapping(value = "/budget-file-template", method = GET) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'SYSTEM_SETTINGS')") public ResponseEntity<OpenLmisResponse> get() { return response("budget_template", service.get()); }
BudgetFileTemplateController extends BaseController { @RequestMapping(value = "/budget-file-template", method = GET) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'SYSTEM_SETTINGS')") public ResponseEntity<OpenLmisResponse> get() { return response("budget_template", service.get()); } }
BudgetFileTemplateController extends BaseController { @RequestMapping(value = "/budget-file-template", method = GET) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'SYSTEM_SETTINGS')") public ResponseEntity<OpenLmisResponse> get() { return response("budget_template", service.get()); }  }
BudgetFileTemplateController extends BaseController { @RequestMapping(value = "/budget-file-template", method = GET) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'SYSTEM_SETTINGS')") public ResponseEntity<OpenLmisResponse> get() { return response("budget_template", service.get()); }  @RequestMapping(value = "/budget-file-template", method = GET) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'SYSTEM_SETTINGS')") ResponseEntity<OpenLmisResponse> get(); @RequestMapping(value = "/budget-file-template", method = POST, headers = ACCEPT_JSON) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'SYSTEM_SETTINGS')") ResponseEntity<OpenLmisResponse> update(@RequestBody EDIFileTemplate ediFileTemplate,
                                                 HttpServletRequest request); }
BudgetFileTemplateController extends BaseController { @RequestMapping(value = "/budget-file-template", method = GET) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'SYSTEM_SETTINGS')") public ResponseEntity<OpenLmisResponse> get() { return response("budget_template", service.get()); }  @RequestMapping(value = "/budget-file-template", method = GET) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'SYSTEM_SETTINGS')") ResponseEntity<OpenLmisResponse> get(); @RequestMapping(value = "/budget-file-template", method = POST, headers = ACCEPT_JSON) @PreAuthorize("@permissionEvaluator.hasPermission(principal,'SYSTEM_SETTINGS')") ResponseEntity<OpenLmisResponse> update(@RequestBody EDIFileTemplate ediFileTemplate,
                                                 HttpServletRequest request);  }