public LocalFileSystem() {
        this.workingDir = new File(System.getProperty("user.dir")).toURI();
        this.homeDir = new File(System.getProperty("user.home")).toURI();
    }
@Test
    void testLocalFilesystem() throws Exception {
        final File tempdir =
                new File(TempDirUtils.newFolder(tempFolder), UUID.randomUUID().toString());

        final File testfile1 = new File(tempdir, UUID.randomUUID().toString());
        final File testfile2 = new File(tempdir, UUID.randomUUID().toString());

        final Path pathtotestfile1 = new Path(testfile1.toURI().getPath());
        final Path pathtotestfile2 = new Path(testfile2.toURI().getPath());

        final LocalFileSystem lfs = new LocalFileSystem();

        final Path pathtotmpdir = new Path(tempdir.toURI().getPath());

        /*
         * check that lfs can see/create/delete/read directories
         */

        // check that dir is not existent yet
        assertThat(lfs.exists(pathtotmpdir)).isFalse();
        assertThat(tempdir.mkdirs()).isTrue();

        // check that local file system recognizes file..
        assertThat(lfs.exists(pathtotmpdir)).isTrue();
        final FileStatus localstatus1 = lfs.getFileStatus(pathtotmpdir);

        // check that lfs recognizes directory..
        assertThat(localstatus1.isDir()).isTrue();

        // get status for files in this (empty) directory..
        final FileStatus[] statusforfiles = lfs.listStatus(pathtotmpdir);

        // no files in there.. hence, must be zero
        assertThat(statusforfiles).isEmpty();

        // check that lfs can delete directory..
        lfs.delete(pathtotmpdir, true);

        // double check that directory is not existent anymore..
        assertThat(lfs.exists(pathtotmpdir)).isFalse();
        assertThat(tempdir).doesNotExist();

        // re-create directory..
        lfs.mkdirs(pathtotmpdir);

        // creation successful?
        assertThat(tempdir).exists();

        /*
         * check that lfs can create/read/write from/to files properly and read meta information..
         */

        // create files.. one ""natively"", one using lfs
        final FSDataOutputStream lfsoutput1 = lfs.create(pathtotestfile1, WriteMode.NO_OVERWRITE);
        assertThat(testfile2.createNewFile()).isTrue();

        // does lfs create files? does lfs recognize created files?
        assertThat(testfile1).exists();
        assertThat(lfs.exists(pathtotestfile2)).isTrue();

        // test that lfs can write to files properly
        final byte[] testbytes = {1, 2, 3, 4, 5};
        lfsoutput1.write(testbytes);
        lfsoutput1.close();

        assertThat(testfile1).hasSize(5L);

        byte[] testbytestest = new byte[5];
        try (FileInputStream fisfile1 = new FileInputStream(testfile1)) {
            assertThat(fisfile1.read(testbytestest)).isEqualTo(testbytestest.length);
        }

        assertThat(testbytestest).containsExactly(testbytes);

        // does lfs see the correct file length?
        assertThat(testfile1).hasSize(lfs.getFileStatus(pathtotestfile1).getLen());

        // as well, when we call the listStatus (that is intended for directories?)
        assertThat(testfile1).hasSize(lfs.listStatus(pathtotestfile1)[0].getLen());

        // test that lfs can read files properly
        final FileOutputStream fosfile2 = new FileOutputStream(testfile2);
        fosfile2.write(testbytes);
        fosfile2.close();

        testbytestest = new byte[5];
        final FSDataInputStream lfsinput2 = lfs.open(pathtotestfile2);
        assertThat(lfsinput2.read(testbytestest)).isEqualTo(5);
        lfsinput2.close();
        assertThat(testbytestest).containsExactly(testbytes);

        // does lfs see two files?
        assertThat(lfs.listStatus(pathtotmpdir)).hasSize(2);

        // do we get exactly one blocklocation per file? no matter what start and len we provide
        assertThat(lfs.getFileBlockLocations(lfs.getFileStatus(pathtotestfile1), 0, 0).length)
                .isOne();

        /*
         * can lfs delete files / directories?
         */
        assertThat(lfs.delete(pathtotestfile1, false)).isTrue();

        // and can lfs also delete directories recursively?
        assertThat(lfs.delete(pathtotmpdir, true)).isTrue();

        assertThat(tempdir).doesNotExist();
    }