@Test public void testClear() { tested.put("1", registry1); tested.put("2", registry2); assertTrue(tested.contains("1")); assertTrue(tested.contains("2")); tested.clear(); assertFalse(tested.contains("1")); assertFalse(tested.contains("2")); verify(registryDestroyer, times(1)).accept(eq(registry1)); verify(registryDestroyer, times(1)).accept(eq(registry2)); }
@SuppressWarnings("all") public void clear() { registryMap.values().stream() .collect(Collectors.toList()) .forEach(registryDestroyer); registryMap.clear(); }
WorkItemDefinitionRegistries { @SuppressWarnings("all") public void clear() { registryMap.values().stream() .collect(Collectors.toList()) .forEach(registryDestroyer); registryMap.clear(); } }
WorkItemDefinitionRegistries { @SuppressWarnings("all") public void clear() { registryMap.values().stream() .collect(Collectors.toList()) .forEach(registryDestroyer); registryMap.clear(); } WorkItemDefinitionRegistries(final Function<T, String> keyProvider,
                                        final Map<String, WorkItemDefinitionCacheRegistry> registryMap,
                                        final Consumer<WorkItemDefinitionCacheRegistry> registryDestroyer); }
WorkItemDefinitionRegistries { @SuppressWarnings("all") public void clear() { registryMap.values().stream() .collect(Collectors.toList()) .forEach(registryDestroyer); registryMap.clear(); } WorkItemDefinitionRegistries(final Function<T, String> keyProvider,
                                        final Map<String, WorkItemDefinitionCacheRegistry> registryMap,
                                        final Consumer<WorkItemDefinitionCacheRegistry> registryDestroyer); boolean contains(final T item); Function<T, WorkItemDefinitionCacheRegistry> registries(); @SuppressWarnings("all") void clear(); WorkItemDefinitionCacheRegistry put(final T item,
                                               final WorkItemDefinitionCacheRegistry registry); WorkItemDefinitionCacheRegistry remove(final T item); }
WorkItemDefinitionRegistries { @SuppressWarnings("all") public void clear() { registryMap.values().stream() .collect(Collectors.toList()) .forEach(registryDestroyer); registryMap.clear(); } WorkItemDefinitionRegistries(final Function<T, String> keyProvider,
                                        final Map<String, WorkItemDefinitionCacheRegistry> registryMap,
                                        final Consumer<WorkItemDefinitionCacheRegistry> registryDestroyer); boolean contains(final T item); Function<T, WorkItemDefinitionCacheRegistry> registries(); @SuppressWarnings("all") void clear(); WorkItemDefinitionCacheRegistry put(final T item,
                                               final WorkItemDefinitionCacheRegistry registry); WorkItemDefinitionCacheRegistry remove(final T item);  }