TypedProperties { public Set<String> keySet() { return _storage.keySet(); }  Object get(String key); Set<String> keySet(); void load(Reader reader); void put(String key, Object value); void remove(String key); void save(Writer writer);  }
@Test public void testKeySet() throws IOException { TypedProperties typedProperties = _createTypedProperties( "testKey1 = \"testValue1\"\ntestKey2 = \"testValue2\""); Set<String> keys = typedProperties.keySet(); Assert.assertEquals(keys.toString(), 2, keys.size()); for (String key : keys) { Assert.assertNotEquals(null, typedProperties.get(key)); } }