@Test
public void testNativeFileSystem() throws IOException {
String homeDir = System.getProperty("user.dir");
NativeFileSystemFactory vfs = new NativeFileSystemFactory();
FileSystemView view = vfs.createFileSystemView(new TestSession());
SshFile file = view.getFile("foo");
String physicalName = ((NativeSshFile) file).getNativeFile().getAbsolutePath();
assertEquals(homeDir + File.separator + "foo", physicalName);
file = view.getFile(view.getFile("foo"), "../bar");
physicalName = ((NativeSshFile) file).getNativeFile().getAbsolutePath();
assertEquals(homeDir + File.separator + "bar", physicalName);
file = view.getFile("../bar");
physicalName = ((NativeSshFile) file).getNativeFile().getAbsolutePath();
assertEquals(new File(homeDir, "../bar").getCanonicalPath(), physicalName);
}