### Question:
Example { public void execute() { String message = messageSource.getMessage("argument.required", new Object[]{"userDao"}, "Required", null); System.out.println(message); }  void setMessageSource(MessageSource messageSource); void execute();  }### Answer:
@Test public void testMessageSource() throws Exception { Example example = getContext().getBean(Example.class); example.execute(); }