code: @Override
    public Properties getConfiguration(Environment environment) {
      Properties properties = new Properties();
  
      Path rootPath;
      if (environment.getName().trim().isEmpty()) {
        rootPath = Paths.get(System.getProperty("user.home"));
      } else {
        rootPath = Paths.get(environment.getName());
      }
  
      if (!rootPath.toFile().exists()) {
        throw new MissingEnvironmentException("Directory doesn't exist: " + rootPath);
      }
  
      List<Path> paths = new ArrayList<>();
      for (Path path : configFilesProvider.getConfigFiles()) {
        paths.add(rootPath.resolve(path));
      }
  
      for (Path path : paths) {
        try (InputStream input = new FileInputStream(path.toFile())) {
  
          PropertiesProvider provider = propertiesProviderSelector.getProvider(path.getFileName().toString());
          properties.putAll(provider.getProperties(input));
  
        } catch (IOException e) {
          throw new IllegalStateException("Unable to load properties from file: " + path, e);
        }
      }
  
      return properties;
    }
docs: Get configuration set for a given {@code environment} from this source in a form of {@link Properties}.
  {@link Environment} name is prepended to all file paths from {@link ConfigFilesProvider}
  to form an absolute configuration file path. If environment name is empty paths are treated as relative
  to the user's home directory location.
  
  @param environment environment to use
  @return configuration set for {@code environment}
  @throws MissingEnvironmentException when requested environment couldn't be found
  @throws IllegalStateException       when unable to fetch configuration