AdbPathUtil { @NotNull public static List<String> getSegments(@NotNull String path) { if (StringUtil.isEmpty(path) || FILE_SEPARATOR.equals(path)) { return new ArrayList<>(); } return StringUtil.split(path, FILE_SEPARATOR); }  @NotNull static String getFileName(@NotNull String path); @NotNull static String getParentPath(@NotNull String path); @NotNull static String resolve(@NotNull String basePath, @NotNull String other); @NotNull static String getEscapedPath(@NotNull String path); @NotNull static List<String> getSegments(@NotNull String path); @NotNull
  static final String FILE_SEPARATOR; @NotNull
  static final String DEVICE_TEMP_DIRECTORY; }
@Test public void testGetSegments() { assertThat(AdbPathUtil.getSegments("")).isEqualTo(Collections.emptyList()); assertThat(AdbPathUtil.getSegments("/")).isEqualTo(Collections.emptyList()); assertThat(AdbPathUtil.getSegments("/foo")).isEqualTo(Collections.singletonList("foo")); assertThat(AdbPathUtil.getSegments("/foo/")).isEqualTo(Collections.singletonList("foo")); assertThat(AdbPathUtil.getSegments("/foo/bar")).isEqualTo(Arrays.asList("foo", "bar")); assertThat(AdbPathUtil.getSegments("/foo/bar/")).isEqualTo(Arrays.asList("foo", "bar")); assertThat(AdbPathUtil.getSegments("/foo/blah/bar-test.txt")).isEqualTo(Arrays.asList("foo", "blah", "bar-test.txt")); }