class ConfigurationSource {

    public static Configuration createFromPropertiesResource(final File propertiesFile) {
        Properties properties;

        try {
            log.info("Loading Properties from : {}", propertiesFile);
            properties = loadProperties(propertiesFile);
            log.info("Properties loaded : {}", properties);
        } catch (final IOException e) {
            log.error("Failure while loading Properties file {}", propertiesFile, e);
            properties = new Properties();
        }

        final ApplicationConfig applicationConfig = ConfigFactory.create(ApplicationConfig.class, properties);
        return new Configuration(propertiesFile, applicationConfig);
    }

}