### Question:
SpringMvcMessageResolver implements MessageResolver { @Override public String getMessage(String key) { return messages.getMessage(key, key); } SpringMvcMessageResolver(MessageSource messages); @Override String getMessage(String key);  }### Answer:
@Test public void testGetMessage() { final String value = "key.something"; final String expectedResult = "Some Text"; when(messages.getMessage(value, null, value, locale)).thenReturn( expectedResult); final String testResult = testee.getMessage(value); assertThat(testResult).isEqualTo(expectedResult); }