PropertiesConfigurationProperties extends Properties { @Override public synchronized Enumeration<?> propertyNames() { return new Vector( getPropertyNames() ).elements(); } PropertiesConfigurationProperties( FileObject fileObject );  PropertiesConfigurationProperties( PropertiesConfiguration propertiesConfiguration ); @Override synchronized String getProperty( String key ); @Override synchronized String getProperty( String key, String defaultValue ); @Override synchronized Object get( Object key ); @Override synchronized Object setProperty( String key, String value ); @Override synchronized Object put( Object key, Object value ); @Override synchronized Set<String> stringPropertyNames(); @Override synchronized Set<Object> keySet(); @Override synchronized Set<Map.Entry<Object, Object>> entrySet(); @Override synchronized int size(); @Override synchronized boolean isEmpty(); @Override synchronized Enumeration<Object> keys(); @Override synchronized Enumeration<Object> elements(); @Override synchronized boolean contains( Object value ); @Override synchronized boolean containsValue( Object value ); @Override synchronized Enumeration<?> propertyNames(); @Override synchronized Collection<Object> values(); @Override synchronized boolean containsKey( Object key ); @Override synchronized Object remove( Object key ); @Override synchronized void putAll( Map<?, ?> t ); @Override synchronized void clear(); @Override synchronized void load( Reader reader ); @Override synchronized void load( InputStream inStream ); @Override void save( OutputStream out, String comments ); @Override void store( Writer writer, String comments ); @Override void store( OutputStream out, String comments ); @Override synchronized void loadFromXML( InputStream in ); @Override void storeToXML( OutputStream os, String comment ); @Override void storeToXML( OutputStream os, String comment, String encoding ); @Override void list( PrintStream out ); @Override void list( PrintWriter out ); @Override synchronized Object clone();  }
@Test public void testPropertyNames() { HashSet<String> names = new HashSet<>( Arrays.asList( "a", "b", "c" ) ); mockKeys( names ); HashSet<String> propertyNames = Collections.list( propertiesConfigurationProperties.propertyNames() ).stream() .map( Object::toString ) .collect( Collectors.toCollection( HashSet::new ) ); assertEquals( names, propertyNames ); }