### Question:
PropertiesHolder implements IHasProperties { @Override public Object removeProperty( String key ) { dirty = true; return properties.remove( key ); } PropertiesHolder(); @Override Object getProperty( String key ); String getPropertyAsString( String key ); @Override void setProperty( String key, Object value ); @Override Object removeProperty( String key ); @Override Set<String> getPropertyKeys(); @Override Map<String, Object> getProperties(); @Override void setProperties( Map<String, Object> props ); @Override void removeProperties( Set<String> keys ); @Override void clearProperties(); @Override boolean containsKey( String key ); @Override boolean isDirty(); @Override void setDirty( boolean dirty ); @Override String toString();  }### Answer:
@Test public void testRemoveProperty() throws Exception { assertTrue( props.getPropertyKeys().isEmpty() ); String value = "myValue"; props.setProperty( "myProperty", value ); assertEquals( props.getPropertyKeys().size(), 1 ); Object o = props.removeProperty( "myProperty" ); assertTrue( props.getPropertyKeys().isEmpty() ); assertEquals( value, o ); }