JCasMetadata { public Optional<Metadata> findMetadata(String key) { Preconditions.checkNotNull(key); return findMetadataStream(key).findFirst(); } JCasMetadata(JCas jCas); Optional<String> find(String key); Optional<Metadata> findMetadata(String key); Optional<String> find(String key, String... more); Set<String> findAll(String key); Set<String> keys();  }
@Test public void findKeyWithMetadata() { assertTrue(metadata.findMetadata(KEY1).isPresent()); }