PropertyFactory { public static Properties create(final String propertyResourceName) { return create(propertyResourceName, null); } private  PropertyFactory(); static Properties create(final String propertyResourceName); static Properties create(final String propertyResourceName, @Nullable final Class base); static String getProperty(final String key, final Properties properties); static String getProperty(final String key, final Properties properties, final String defaultValue);  }
@Test public void properties() throws Exception { Properties properties = PropertyFactory.create("/test.properties"); assertThat(properties.size(), is(2)); assertThat(properties.keySet(), hasItems((Object) "key1", "key2")); assertThat(properties.get("key1"), is((Object) "value1")); assertThat(properties.get("key2"), is((Object) "value2")); }