### Question:
UnixPathParser { public static List<String> parse(String unixPath) { List<String> pathComponents = new ArrayList<>(); for (String component : unixPath.split("/", -1)) { if (!component.isEmpty()) { pathComponents.add(component); } } return pathComponents; } private  UnixPathParser(); static List<String> parse(String unixPath);  }### Answer:
@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 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")); }