### Question:
PathUtils { public static String normalizePath(String path) { if (!StringUtils.hasText(path)) { return path; } String normalizedPath = path; if (!normalizedPath.startsWith("/")) { normalizedPath = "/" + normalizedPath; } if (normalizedPath.endsWith("/")) { normalizedPath = normalizedPath.substring(0, normalizedPath.length() - 1); } return normalizedPath; } private  PathUtils(); static String normalizePath(String path);  }### Answer:
@Test public void normalizePath() { assertThat(PathUtils.normalizePath(null)).isEqualTo(null); assertThat(PathUtils.normalizePath("")).isEqualTo(""); assertThat(PathUtils.normalizePath("/")).isEqualTo(""); assertThat(PathUtils.normalizePath("admin")).isEqualTo("/admin"); assertThat(PathUtils.normalizePath("/admin")).isEqualTo("/admin"); assertThat(PathUtils.normalizePath("/admin/")).isEqualTo("/admin"); assertThat(PathUtils.normalizePath("admin/")).isEqualTo("/admin"); }