MetadataHelper { public static Properties convertToProperties(Collection<MetadataElement> s) { Properties result = new Properties(); for (MetadataElement e : s) { result.setProperty(e.getKey(), e.getValue()); } return result; }  static Properties convertToProperties(Collection<MetadataElement> s); static Set<MetadataElement> convertFromProperties(Properties p); static Set<MetadataElement> convertFromKeyValuePairs(KeyValuePairBag bag); static Set<MetadataElement> metadataFromMatchGroups(MatchResult matchResult, List<String> metadataKeys);  }
@Test public void testConvertToProperties() { MetadataCollection c = new MetadataCollection(); c.add(new MetadataElement("test", "value")); assertNotNull(convertToProperties(c)); assertTrue(convertToProperties(c).containsKey("test")); }