JobSettings { public void remove(final String key) { final Optional<Metadata> md = metadata.findMetadata(key); if (md.isPresent()) { md.get().removeFromIndexes(); } } JobSettings(final JCas jCas); String get(final String key, final String defaultValue); Optional<String> get(final String key); void set(final String key, final String value); void remove(final String key); Stream<String> keys();  }
@Test public void testRemove() { settings.remove("key"); settings.set("key", "value"); assertEquals("value", settings.get("key").get()); settings.remove("key"); assertFalse(settings.get("key").isPresent()); }