@Test
public void testResolveMessageIsDebugEnabledFalse() throws Exception {

    // set up
    LogLevelChangeUtil.setLogLevel(LogLevelChangeUtil.LogLevel.INFO);
    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(message.getText()).thenReturn("MESSAGE_TEXT");
    when(messageSource.getMessage("MSG001", null, locale)).thenThrow(
            new NoSuchMessageException("MSG001"));
    String msg = ResultMessageUtils.resolveMessage(message, messageSource,
            locale);
    // assert
    assertThat(msg, is("MESSAGE_TEXT"));
    assertThat(logger.isDebugEnabled(), is(false));
    // init log level
    LogLevelChangeUtil.resetLogLevel();
}