assertThat(value, is(String.class));
}
@Test
public void shouldReturnStringWhenNestedCannotBeExpanded() throws Exception {
StaticMessageSource messageSource = new StaticMessageSource();
messageSource.addMessage("test", Locale.getDefault(), "test {0} {1} message");
TestMessageSourceMap map = new TestMessageSourceMap(messageSource);
map.setReturnStringWhenPossible(true);
Object value = map.get("test", "x", "y");
assertThat(value.toString(), is("test x y message"));
assertThat(value, is(String.class));