### Question:
ConfigService implements EntityService { @Override public Map<String, Object> get(String id) { return entityService.get(id); }  @Override StreamingOutput getAll(Integer from, Integer size, String[] fieldsToRemove); @Override List<Map<String, Object>> getAll(); @Override Map<String, Object> get(String id); @Override String create(Map<String, Object> entity); @Override void create(String id, Map<String, Object> entity); @Override void update(String id, Map<String, Object> entity); @Override void delete(String id); @Override ListRequest listRequestInit(); @Override ListRequest listRequestNext(ListRequest previous); static final String CFGNAME_SEARCH_RESPONSE_FIELDS; static final String CFGNAME_SEARCH_FULLTEXT_QUERY_FIELDS; static final String CFGNAME_SEARCH_FULLTEXT_HIGHLIGHT_FIELDS; static final String CFGNAME_SEARCH_FULLTEXT_AGGREGATIONS_FIELDS; static final String CFGNAME_SEARCH_FULLTEXT_FILTER_FIELDS; static final String CFGNAME_NORMALIZATIONS; static final String CFGNAME_SECURITY_RESTAPI_CORS; }### Answer:
@Test public void get() { ConfigService tested = getTested(); Map<String, Object> value = new HashMap<String, Object>(); Mockito.when(tested.entityService.get("10")).thenReturn(value); Assert.assertEquals(value, tested.get("10")); Mockito.reset(tested.entityService); Mockito.when(tested.entityService.get("10")).thenReturn(null); Assert.assertEquals(null, tested.get("10")); Mockito.verify(tested.entityService).get("10"); Mockito.verifyNoMoreInteractions(tested.entityService); Mockito.reset(tested.entityService); Mockito.when(tested.entityService.get("10")).thenThrow(new RuntimeException("testex")); try { tested.get("10"); Assert.fail("RuntimeException expected"); } catch (RuntimeException e) { } Mockito.verify(tested.entityService).get("10"); Mockito.verifyNoMoreInteractions(tested.entityService); }