Properties extends HashMap<String, Object> { public Object put(final String key, final Object value) { if (value == null) { return remove(key); } return super.put(key, value); } Properties();  Properties(final Map<String, Object> original); Object put(final String key,
                      final Object value); void store(final OutputStream out); void store(final OutputStream out,
                      boolean closeOnFinish); void load(final InputStream in); void load(final InputStream in,
                     boolean closeOnFinish);  }
@Test public void testNullValues() throws IOException { final Map<String, Object> original = new HashMap<String, Object>(); original.put("key1", "value1"); original.put("key2", null); final Properties properties = new Properties(original); assertEquals(1, properties.size()); assertTrue(properties.containsKey("key1")); assertEquals("value1", properties.get("key1")); assertFalse(properties.containsKey("key2")); }