### Question:
MapRegistry implements DynamicRegistry<T> { @Override public boolean isEmpty() { return items.isEmpty(); } MapRegistry(final KeyProvider<T> keyProvider,
                final Map<String, T> items); @Override void register(final T item); boolean remove(final T item); @Override boolean contains(final T item); @Override boolean isEmpty(); Collection<T> getItems(); void clear(); T getItemByKey(final String key);  }### Answer:
@Test public void testEmpty() { when(map.isEmpty()).thenReturn(true); boolean empty = tested.isEmpty(); assertTrue(empty); }
@Test public void testNotEmpty() { when(map.isEmpty()).thenReturn(false); boolean empty = tested.isEmpty(); assertFalse(empty); }