    @Test
    public void testListFiles() throws IOException {

        final LocalFileInputPlugin.PluginTask task = buildTask("foofoo");
        this.workdir.newFile("foofoo1");
        this.workdir.newFile("FooFoo2");
        this.workdir.newFile("barbar3");
        this.workdir.newFolder("foofoo4");
        this.workdir.newFile("foofoo4/foo");
        this.workdir.newFile("foofoo4/bar");
        this.workdir.newFolder("barbar5");
        this.workdir.newFile("barbar5/foo");
        this.workdir.newFile("barbar5/bar");
        this.workdir.newFolder("fooFoo6");
        this.workdir.newFile("fooFoo6/foo");
        this.workdir.newFile("fooFoo6/bar");
        final List<String> files = listFiles(task);

        // It intentionally tests in the platform-aware way, not in the platform-oblivious way.
        if (System.getProperty("os.name").contains("Windows")) {
            assertEquals(6, files.size());
            assertTrue(files.contains(buildPath("foofoo1")));
            assertTrue(files.contains(buildPath("FooFoo2")));
            assertTrue(files.contains(buildPath("foofoo4\\foo")));
            assertTrue(files.contains(buildPath("foofoo4\\bar")));
            assertTrue(files.contains(buildPath("fooFoo6\\foo")));
            assertTrue(files.contains(buildPath("fooFoo6\\bar")));
        } else if (System.getProperty("os.name").contains("Mac OS")) {
            assertEquals(3, files.size());
            assertTrue(files.contains(buildPath("foofoo1")));
            assertTrue(files.contains(buildPath("foofoo4/foo")));
            assertTrue(files.contains(buildPath("foofoo4/bar")));
        } else {
            assertEquals(3, files.size());
            assertTrue(files.contains(buildPath("foofoo1")));
            assertTrue(files.contains(buildPath("foofoo4/foo")));
            assertTrue(files.contains(buildPath("foofoo4/bar")));
        }
    }