@Test public void testInitializeRegistry() { final String id = "id"; final Registry registry = mock(Registry.class); doReturn(registry).when(provider).createRegistry(); provider.initializeRegistry(id); assertTrue(provider.getRegistryMap().containsKey(id)); assertEquals(registry, provider.getRegistryMap().get(id)); }
void initializeRegistry(final String diagramId) { getRegistryMap().putIfAbsent(diagramId, createRegistry()); }
RegistryProvider { void initializeRegistry(final String diagramId) { getRegistryMap().putIfAbsent(diagramId, createRegistry()); } }
RegistryProvider { void initializeRegistry(final String diagramId) { getRegistryMap().putIfAbsent(diagramId, createRegistry()); } @Inject  RegistryProvider(final ManagedInstance<CommandRegistryHolder> registryHolders,
                            final GraphsProvider graphsProvider); }
RegistryProvider { void initializeRegistry(final String diagramId) { getRegistryMap().putIfAbsent(diagramId, createRegistry()); } @Inject  RegistryProvider(final ManagedInstance<CommandRegistryHolder> registryHolders,
                            final GraphsProvider graphsProvider); Registry<Command<AbstractCanvasHandler, CanvasViolation>> getCurrentCommandRegistry(); void setRegistryChangeListener(final RegistryChangeListener registryChangeListener); }
RegistryProvider { void initializeRegistry(final String diagramId) { getRegistryMap().putIfAbsent(diagramId, createRegistry()); } @Inject  RegistryProvider(final ManagedInstance<CommandRegistryHolder> registryHolders,
                            final GraphsProvider graphsProvider); Registry<Command<AbstractCanvasHandler, CanvasViolation>> getCurrentCommandRegistry(); void setRegistryChangeListener(final RegistryChangeListener registryChangeListener);  }