### Question:
VersionProvider { static String defaultStoragePathForNormalizedOS( final String detectedOS, Map<String, String> env) { if (detectedOS.equals("windows")) { return env.get(ENV_LOCALAPPDATA) + "\\teku"; } else if (detectedOS.equals("osx")) { return env.get(ENV_HOME) + "/Library/teku"; } String dataHome = env.get(ENV_XDG_DATA_HOME); if (StringUtils.isEmpty(dataHome)) { dataHome = env.get(ENV_HOME) + "/.local/share"; } return dataHome + "/teku"; }  static Bytes32 getDefaultGraffiti(); static String detectJvm(); static String defaultStoragePath(); static final String ENV_XDG_DATA_HOME; static final String ENV_LOCALAPPDATA; static final String ENV_HOME; static final String CLIENT_IDENTITY; static final String IMPLEMENTATION_VERSION; static final String VERSION; }### Answer:
@Test void defaultStoragePath_shouldHandleWindowsPath() { final String homeFolder = "c:\\users\\myUser\\AppData\\local"; final Map<String, String> env = Map.of(ENV_LOCALAPPDATA, homeFolder); assertThat(VersionProvider.defaultStoragePathForNormalizedOS("windows", env)) .isEqualTo(homeFolder + "\\teku"); }
@Test void defaultStoragePath_shouldHandleMacPath() { final String homeFolder = "/Users/myUser"; Map<String, String> env = Map.of(ENV_HOME, homeFolder); assertThat(VersionProvider.defaultStoragePathForNormalizedOS("osx", env)) .isEqualTo(homeFolder + "/Library" + TEKU); }
@Test void defaultStoragePath_shouldHandleXdgHome() { final String homeFolder = "/data/myUser"; Map<String, String> env = Map.of(ENV_XDG_DATA_HOME, homeFolder); assertThat(VersionProvider.defaultStoragePathForNormalizedOS("linux", env)) .isEqualTo(homeFolder + TEKU); }
@Test void defaultStoragePath_shouldHandleEmptyXdgHome() { final String homeFolder = "/home/myUser"; Map<String, String> env = Map.of(ENV_XDG_DATA_HOME, Strings.EMPTY, ENV_HOME, homeFolder); assertThat(VersionProvider.defaultStoragePathForNormalizedOS("aix", env)) .isEqualTo(homeFolder + "/.local/share" + TEKU); }
@Test void defaultStoragePath_shouldHandleLocalHome() { final String homeFolder = "/home/myUser"; Map<String, String> env = Map.of(ENV_HOME, homeFolder); assertThat(VersionProvider.defaultStoragePathForNormalizedOS("aix", env)) .isEqualTo(homeFolder + "/.local/share" + TEKU); }