AdbPathUtil { @NotNull public static String resolve(@NotNull String basePath, @NotNull String other) { if (isEmpty(other)) { return basePath; } if (isAbsolute(other)) { return other; } if (isSuffixed(basePath)) { return basePath + other; } return basePath + FILE_SEPARATOR + other; }  @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 testResolve() { assertThat(AdbPathUtil.resolve("", "")).isEqualTo(""); assertThat(AdbPathUtil.resolve("/foo", "")).isEqualTo("/foo"); assertThat(AdbPathUtil.resolve("/foo/", "")).isEqualTo("/foo/"); assertThat(AdbPathUtil.resolve("/", "foo")).isEqualTo("/foo"); assertThat(AdbPathUtil.resolve("/foo", "")).isEqualTo("/foo"); assertThat(AdbPathUtil.resolve("/bar", "/foo")).isEqualTo("/foo"); assertThat(AdbPathUtil.resolve("/bar/", "/foo")).isEqualTo("/foo"); assertThat(AdbPathUtil.resolve("/bar", "foo")).isEqualTo("/bar/foo"); assertThat(AdbPathUtil.resolve("/bar/", "foo")).isEqualTo("/bar/foo"); assertThat(AdbPathUtil.resolve("bar", "foo")).isEqualTo("bar/foo"); assertThat(AdbPathUtil.resolve("bar/", "foo")).isEqualTo("bar/foo"); assertThat(AdbPathUtil.resolve("/bar/foo2", "bar/foo")).isEqualTo("/bar/foo2/bar/foo"); assertThat(AdbPathUtil.resolve("/bar/foo2/", "bar/foo")).isEqualTo("/bar/foo2/bar/foo"); assertThat(AdbPathUtil.resolve("/bar/foo2", "/bar/foo")).isEqualTo("/bar/foo"); assertThat(AdbPathUtil.resolve("/bar/foo2/", "/bar/foo")).isEqualTo("/bar/foo"); }