### Question:
StackRegistry implements DynamicRegistry<T> { @Override public void register(final T item) { items.add(item); } StackRegistry(final KeyProvider<T> keyProvider,
                         final Stack<T> items); T peek(); T pop(); @Override void register(final T item); boolean remove(final T item); @Override boolean contains(final T item); @Override boolean isEmpty(); T getItemByKey(final String id); int indexOf(final T item);  }### Answer:
@Test public void testRegister() { final String s = "an string"; tested.register(s); verify(stack, times(1)).add(s); }