KogitoCommandRegistry implements Registry<C> { @Override public void clear() { wrapped.clear(); notifyRegistryChange(); } KogitoCommandRegistry();   KogitoCommandRegistry(Supplier<Boolean> envelopeEnabledSupplier, Supplier<KogitoJSCommandRegistry<C>> kogitoJSCommandRegistrySupplier); @Override void register(C item); @Override C peek(); @Override C pop(); @Override List<C> getHistory(); @Override void setMaxSize(int size); @Override void clear(); @Override boolean isEmpty(); @Override void setRegistryChangeListener(final RegistryChangeListener registryChangeListener);  }
@Test public void testClear() { commandRegistry.clear(); verify(kogitoJSCommandRegistry).clear(); verify(registryChangeListener).notifyRegistryChange(); }