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