@Test
  public void testUnix_illegalCharacters() {
    try {
      PathType.unix().parsePath("/foo/bar\0");
      fail();
    } catch (InvalidPathException expected) {
      assertEquals(8, expected.getIndex());
    }

    try {
      PathType.unix().parsePath("/\u00001/foo");
      fail();
    } catch (InvalidPathException expected) {
      assertEquals(1, expected.getIndex());
    }
  }
Tests for {@link UnixPathType}.

@author Colin Decker
jimfs/src/test/java/com/google/common/jimfs/UnixPathTypeTest.java