@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");
}