### Question:
ResourceUsageBean { public String getMessage(String code, Object[] args, Locale locale) throws NoSuchMessageException { return messageSource.getMessage(code, args, locale); }  String getMessage(String code, Object[] args, Locale locale); String getMessage(String code, Object[] args, String defaultMessage, Locale locale); void setMessageSource(MessageSource messageSource);  }### Answer:
@Test public void testGetMessage() throws Exception { String messageOne = resourceUsageBean.getMessage("message", null, null); String messageTwo = resourceUsageBean.getMessage("placeholderMessage", new Object[]{"ParameterOne", "ParameterTwo"}, Locale.UK); System.out.println(PrintUtil.formatTestResult(messageOne, messageTwo)); }
@Test public void testGetMessageWithDefault() throws Exception { String messageOne = resourceUsageBean.getMessage("messageOne", null, "messageOne is not exist!", null); String messageTwo = resourceUsageBean.getMessage("placeholderMessage", new Object[]{"ParameterOne", "ParameterTwo"}, Locale.UK); System.out.println(PrintUtil.formatTestResult(messageOne, messageTwo)); }