public static Path getConfigHome() {
    return getConfigHome(System.getProperties(), System.getenv());
  }
@Test
  public void testGetConfigHome_hasXdgConfigHome() {
    Properties fakeProperties = new Properties();
    fakeProperties.setProperty("user.home", fakeConfigHome);
    Map<String, String> fakeEnvironment = ImmutableMap.of("XDG_CONFIG_HOME", fakeConfigHome);

    fakeProperties.setProperty("os.name", "linux");
    Assert.assertEquals(
        Paths.get(fakeConfigHome).resolve("google-cloud-tools-java").resolve("jib"),
        XdgDirectories.getConfigHome(fakeProperties, fakeEnvironment));

    fakeProperties.setProperty("os.name", "windows");
    Assert.assertEquals(
        Paths.get(fakeConfigHome).resolve("Google").resolve("Jib").resolve("Config"),
        XdgDirectories.getConfigHome(fakeProperties, fakeEnvironment));

    fakeProperties.setProperty("os.name", "mac");
    Assert.assertEquals(
        Paths.get(fakeConfigHome).resolve("Google").resolve("Jib"),
        XdgDirectories.getConfigHome(fakeProperties, fakeEnvironment));
  }