### Question:
RegistryProvider { Registry<Command<AbstractCanvasHandler, CanvasViolation>> createRegistry() { final Registry<Command<AbstractCanvasHandler, CanvasViolation>> commandRegistry = registryHolders.get().getRegistry(); if (!Objects.isNull(registryChangeListener)) { commandRegistry.setRegistryChangeListener(registryChangeListener); } return commandRegistry; } @Inject  RegistryProvider(final ManagedInstance<CommandRegistryHolder> registryHolders,
                            final GraphsProvider graphsProvider); Registry<Command<AbstractCanvasHandler, CanvasViolation>> getCurrentCommandRegistry(); void setRegistryChangeListener(final RegistryChangeListener registryChangeListener);  }### Answer:
@Test public void testCreateRegistry() { final CommandRegistryHolder registryHolder = mock(CommandRegistryHolder.class); final Registry registry = mock(Registry.class); when(registryHolders.get()).thenReturn(registryHolder); when(registryHolder.getRegistry()).thenReturn(registry); final Registry createdRegistry = provider.createRegistry(); assertEquals(registry, createdRegistry); verify(createdRegistry, never()).setRegistryChangeListener(any()); }