MetadataRegistryImpl extends AbstractRegistry<Metadata, MetadataKey, MetadataProvider> implements MetadataRegistry { @Override public void removeItemMetadata(String itemName) { getManagedProvider() .ifPresent(managedProvider -> ((ManagedMetadataProvider) managedProvider).removeItemMetadata(itemName)); } MetadataRegistryImpl(); @Override boolean isInternalNamespace(String namespace); @Override void removeItemMetadata(String itemName);  }
@Test public void testRemoveItemMetadata() { ArgumentCaptor<String> captor = ArgumentCaptor.forClass(String.class); registry.removeItemMetadata("itemName"); verify(managedProvider).removeItemMetadata(captor.capture()); assertEquals("itemName", captor.getValue()); }