PropertyHelper { public static Properties getPropertySubset(Properties p, String prefix) { return getPropertySubset(p, prefix, false); }  static Properties getPropertySubset(Properties p, String prefix); static Properties getPropertySubset(Properties p, String prefix, boolean ignoreCase); static String getPropertyIgnoringCase(Properties p, String key, String defaultValue); static Map<String, String> asMap(Properties p); static String getPropertyIgnoringCase(Properties p, String key); static Properties loadQuietly(final File file); static Properties loadQuietly(final String resource); static Properties loadQuietly(final ClassLoader cl, final String resource); static Properties loadQuietly(final URL resource); static Properties loadQuietly(final InputStream in); static Properties loadQuietly(PropertyInputStream e); static Properties load(PropertyInputStream e);  }
@Test public void testGetPropertySubsetPropertiesString() { Properties p = getPropertySubset(createTestSample(), "a"); assertEquals(2, p.size()); }
@Test public void testGetPropertySubsetPropertiesStringBoolean() { Properties p = getPropertySubset(createTestSample(), "A", true); assertEquals(2, p.size()); }