### Question:
ProviderService implements EntityService { @Override public void update(String id, Map<String, Object> entity) { entityService.update(id, entity); flushCaches(); }  boolean authenticate(String providerName, String password); boolean isSuperProvider(String providerName); ProviderContentTypeInfo findContentType(String typeName); Map<String, Object> findProvider(String providerName); @Override String create(Map<String, Object> entity); @Override void create(String id, Map<String, Object> entity); @Override List<Map<String, Object>> getAll(); @Override StreamingOutput getAll(Integer from, Integer size, String[] fieldsToRemove); @Override Map<String, Object> get(String id); @Override void update(String id, Map<String, Object> entity); @Override void delete(String id); void flushCaches(); List<Map<String, String>> runPreprocessors(String typeName, List<Map<String, Object>> preprocessorsDef,
			Map<String, Object> content); String generateSysId(String type, String contentId); String parseTypeNameFromSysId(String contentSysId); @SuppressWarnings("unchecked") static Map<String, Object> extractContentType(Map<String, Object> providerDef, String typeName); @SuppressWarnings("unchecked") static Map<String, Map<String, Object>> extractAllContentTypes(Map<String, Object> providerDef); @SuppressWarnings("unchecked") static List<Map<String, Object>> extractPreprocessors(Map<String, Object> typeDef, String typeName); static List<Map<String, Object>> extractPreprocessors(ProviderContentTypeInfo typeInfo, String typeName); @SuppressWarnings("unchecked") static String extractIndexName(Map<String, Object> typeDef, String typeName); static String extractIndexName(ProviderContentTypeInfo typeInfo, String typeName); @SuppressWarnings("unchecked") static String[] extractSearchIndices(Map<String, Object> typeDef, String typeName); static String[] extractSearchIndices(ProviderContentTypeInfo typeInfo, String typeName); static Collection<String> extractTypeVisibilityRoles(ProviderContentTypeInfo typeInfo, String typeName); static Collection<String> extractTypeVisibilityRoles(Map<String, Object> typeDef, String typeName); @SuppressWarnings("unchecked") static String extractIndexType(Map<String, Object> typeDef, String typeName); static String extractIndexType(ProviderContentTypeInfo typeInfo, String typeName); static String extractSysType(Map<String, Object> typeDef, String typeName); @SuppressWarnings("unchecked") static Map<String, Object> extractIndexerConfiguration(Map<String, Object> typeDef, String typeName); static String extractSysContentContentType(Map<String, Object> typeDef, String typeName); static boolean extractSearchAllExcluded(Map<String, Object> typeDef); static boolean extractPersist(Map<String, Object> typeDef); @Override ListRequest listRequestInit(); @Override ListRequest listRequestNext(ListRequest previous); static final String NAME; static final String PASSWORD_HASH; static final String SUPER_PROVIDER; static final String TYPE; static final String INDEX; static final String INDEXER; static final String SYS_TYPE; static final String SYS_VISIBLE_FOR_ROLES; static final String INPUT_PREPROCESSORS; static final String SEARCH_INDICES; static final String SEARCH_ALL_EXCLUDED; static final String PERSIST; static final String SYS_CONTENT_CONTENT_TYPE; }### Answer:
@Test public void update() { ProviderService tested = getTested(); tested.cacheAllProvidersValidTo = 1000; Map<String, Object> value = new HashMap<String, Object>(); tested.update("aaa", value); Assert.assertEquals(0, tested.cacheAllProvidersValidTo); Mockito.verify(tested.entityService).update("aaa", value); Mockito.verifyNoMoreInteractions(tested.entityService); }