public static List<String> parse(String unixPath) {
    List<String> pathComponents = new ArrayList<>();
    // -1 limit for Guava Splitter behavior: https://errorprone.info/bugpattern/StringSplitter
    for (String component : unixPath.split("/", -1)) {
      if (!component.isEmpty()) {
        pathComponents.add(component);
      }
    }
    return pathComponents;
  }
@Test
  public void testParse() {
    Assert.assertEquals(ImmutableList.of("some", "path"), UnixPathParser.parse("/some/path"));
    Assert.assertEquals(ImmutableList.of("some", "path"), UnixPathParser.parse("some/path/"));
    Assert.assertEquals(ImmutableList.of("some", "path"), UnixPathParser.parse("some///path///"));
    // Windows-style paths are resolved in Unix semantics.
    Assert.assertEquals(
        ImmutableList.of("\\windows\\path"), UnixPathParser.parse("\\windows\\path"));
    Assert.assertEquals(ImmutableList.of("T:\\dir"), UnixPathParser.parse("T:\\dir"));
    Assert.assertEquals(
        ImmutableList.of("T:\\dir", "real", "path"), UnixPathParser.parse("T:\\dir/real/path"));
  }