PropertyReader { public void setProperties(final Properties properties) { Set<Object> keySet = properties.keySet(); for (Object key : keySet) { String value = properties.getProperty(key.toString()); propertyHolder.addProperty(key.toString(), value); } LOGGER.debug("LOADED PROPERTY: " + propertyHolder.get("webapp.port")); LOGGER.debug("LOADED PROPERTY: " + propertyHolder.get("lucene.index.folder")); }  void setProperties(final Properties properties);  }
@Test public void testSetPropertiesShouldPutPropertiesToPropertyHolder() { properties.put("webapp.port", "1234"); underTest.setProperties(properties); PropertyHolder actual = (PropertyHolder) Whitebox.getInternalState(underTest, "propertyHolder"); assertEquals(actual.getInt("webapp.port"), Integer.valueOf(1234)); }