MessageSourceBridge extends AbstractMap<String, String> { @Override public String get(Object key) { return this.messageSourceAccessor.getMessage((String) key); } MessageSourceBridge(MessageSource messageSource); @Override String get(Object key); @Override @NonNull Set<Entry<String, String>> entrySet();  }
@Test void testGet() { when(this.messageSourceAccessor.getMessage("foo")).thenReturn("bar"); assertThat(this.messageSourceBridge.get("foo")).isEqualTo("bar"); }