This is going to suck, but we need to test both implementations.  If the native implementation doesn't load, we should abort the test with a failure.

We can use a system property to disable the native implementation test.  Developers who are trying to build JGit and can't run the native implementation on their platform would just need to define the system property on the Maven command line to bypass it.  So something like:

  public void test_lstat_native() throws Exception {
    if (!Boolean.valueOf("org.eclipse.jgit.fs.native"))
      return;

    FSAccess native = new FSAccessNative();
    ...somehow assert native has native JNI loaded...
    do_lstat(native);  
  }

  public void test_lstat_java() throws Exception {
    do_lstat(new FSAccessJava());
  }

  private void do_lstat(FSAccess imp) throws Exception {
    ... this test method ...
  }