@Test public void shouldGetAllMessages() throws Exception { when(messageService.getCurrentLocale()).thenReturn(Locale.getDefault()); ResponseEntity<OpenLmisResponse> response = messagesController.getAllMessages(); Map<String, String> messages = (Map<String, String>)response.getBody().getData().get(MESSAGES); assertNotNull(messages); }
@RequestMapping(value = "/messages", method = GET, headers = "Accept=application/json") public ResponseEntity<OpenLmisResponse> getAllMessages() throws UnsupportedEncodingException { Map<String, String> result = messageService.allMessages(); return OpenLmisResponse.response(MESSAGES, result); }
MessagesController extends BaseController { @RequestMapping(value = "/messages", method = GET, headers = "Accept=application/json") public ResponseEntity<OpenLmisResponse> getAllMessages() throws UnsupportedEncodingException { Map<String, String> result = messageService.allMessages(); return OpenLmisResponse.response(MESSAGES, result); } }
MessagesController extends BaseController { @RequestMapping(value = "/messages", method = GET, headers = "Accept=application/json") public ResponseEntity<OpenLmisResponse> getAllMessages() throws UnsupportedEncodingException { Map<String, String> result = messageService.allMessages(); return OpenLmisResponse.response(MESSAGES, result); }  }
MessagesController extends BaseController { @RequestMapping(value = "/messages", method = GET, headers = "Accept=application/json") public ResponseEntity<OpenLmisResponse> getAllMessages() throws UnsupportedEncodingException { Map<String, String> result = messageService.allMessages(); return OpenLmisResponse.response(MESSAGES, result); }  @RequestMapping(value = "/messages", method = GET, headers = "Accept=application/json") ResponseEntity<OpenLmisResponse> getAllMessages(); }
MessagesController extends BaseController { @RequestMapping(value = "/messages", method = GET, headers = "Accept=application/json") public ResponseEntity<OpenLmisResponse> getAllMessages() throws UnsupportedEncodingException { Map<String, String> result = messageService.allMessages(); return OpenLmisResponse.response(MESSAGES, result); }  @RequestMapping(value = "/messages", method = GET, headers = "Accept=application/json") ResponseEntity<OpenLmisResponse> getAllMessages(); static final String MESSAGES; }