source: class ResultMessageUtilsTest {
  
      private Logger logger;
  
      @Test
      public void testResolveMessageWithLocale() {
  
target:         ResultMessage message = mock(ResultMessage.class);
          MessageSource messageSource = mock(MessageSource.class);
          Locale locale = Locale.getDefault();
          when(message.getCode()).thenReturn("MSG001");
          when(message.getArgs()).thenReturn(null);
          when(messageSource.getMessage("MSG001", null, locale)).thenReturn(
                  "MESSAGE_TEXT");
  
          String msg = ResultMessageUtils.resolveMessage(message, messageSource,
                  locale);
          assertThat(msg, is("MESSAGE_TEXT"));
      }
  
  }