KogitoCommandRegistry implements Registry<C> { @Override public List<C> getHistory() { return Stream.of(wrapped.getCommands()) .collect(Collectors.toList()); } 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 testGetCommandsHistory() { commandRegistry.getHistory(); verify(kogitoJSCommandRegistry).getCommands(); }