### Question:
ConfigService implements EntityService { @Override public String create(Map<String, Object> entity) { String id = entityService.create(entity); return 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 create_noid() { ConfigService tested = getTested(); { Map<String, Object> entity = new HashMap<String, Object>(); entity.put("name", "v1"); Mockito.when(tested.entityService.create(entity)).thenReturn("1"); String id = tested.create(entity); Assert.assertEquals("1", id); } }
@Test public void create_id() { ConfigService tested = getTested(); { Map<String, Object> entity = new HashMap<String, Object>(); entity.put("name", "v1"); tested.create("1", entity); Mockito.verify(tested.entityService).create("1", entity); } }