PropertyAccessor implements IPropertyAcessor { public synchronized Set<String> getPropertyNames(String propertyFile) throws PropertyAccessException { validateInput(propertyFile); loadPropertyFile(propertyFile); return propertyFileDAO.getPropertyNames(propertyFile); } protected  PropertyAccessor(); static PropertyAccessor getInstance(); synchronized void setPropertyFile(String propertyFileName); @Override synchronized String getProperty(String propertyFile, String propertyName); @Override synchronized String getProperty(String propertyFile, String propertyName, String defaultValue); @Override synchronized void setProperty(String propertyFileName, String key, String value); @Override String getPropertyComment(String propertyFileName, String key); @Override synchronized boolean getPropertyBoolean(String propertyFile, String propertyName); @Override synchronized boolean getPropertyBoolean(String propertyFile, String propertyName, boolean defaultValue); synchronized long getPropertyLong(String propertyFile, String propertyName); @Override Long getPropertyLongObject(String propertyFile, String propertyName, Long defaultValue); synchronized Set<String> getPropertyNames(String propertyFile); synchronized final Properties getProperties(String propertyFile); synchronized String getPropertyFileLocation(); synchronized String getPropertyFileLocation(String propertyFileName); synchronized void setPropertyFileLocation(String propertyFileDirAbsolutePath); synchronized String getPropertyFileURL(); void dumpPropsToLog(String propertyFile); static final PropertyAccessor INSTANCE; }
@Test public void testGetPropertyNames() throws PropertyAccessException { PropertyAccessor propAccessor = createPropertyAccessor(); Set<String> propertyNamesSet = propAccessor.getPropertyNames(PROPERTY_FILE_NAME); assertEquals(1, propertyNamesSet.size()); }