static Settings newSettings(Path settingsFile) {
    Preconditions.checkArgument(Files.isRegularFile(settingsFile));
    try {
      SettingsBuilder settingsBuilder = new DefaultSettingsBuilderFactory().newInstance();
      SettingsBuildingRequest settingsRequest = new DefaultSettingsBuildingRequest();
      settingsRequest.setUserSettingsFile(settingsFile.toFile());
      return settingsBuilder.build(settingsRequest).getEffectiveSettings();
    } catch (SettingsBuildingException ex) {
      throw new IllegalStateException("Tests need to be rewritten: " + ex.getMessage(), ex);
    }
  }
Create a new {@link Settings} for testing purposes.

@param settingsFile absolute path to settings.xml
@return {@link Settings} built from settingsFile
jib-maven-plugin/src/test/java/com/google/cloud/tools/jib/maven/SettingsFixture.java