@Test
public void testSearchFiles() throws IOException {

    File child1 = new File(tempDir + Config.getPathSeparator()+"child1");
    File child2 = new File(tempDir + Config.getPathSeparator()+"child2");
    File child11 = new File(child1 + Config.getPathSeparator()+"child11");
    File child111 = new File(child11 + Config.getPathSeparator()+"child111");
    File child12 = new File(child1 + Config.getPathSeparator()+"child12");
    File child21 = new File(child2 + Config.getPathSeparator()+"child21");
    File child22 = new File(child2 + Config.getPathSeparator()+"child22");
    if(Config.isOSPOSIXCompatible()) {
        Files.createDirectory(child1.toPath(), fileAttribute).toFile().deleteOnExit();
        Files.createDirectory(child2.toPath(), fileAttribute).toFile().deleteOnExit();
        Files.createDirectory(child11.toPath(), fileAttribute).toFile().deleteOnExit();
        Files.createDirectory(child12.toPath(), fileAttribute).toFile().deleteOnExit();
        Files.createDirectory(child21.toPath(), fileAttribute).toFile().deleteOnExit();
        Files.createDirectory(child22.toPath(), fileAttribute).toFile().deleteOnExit();
        Files.createDirectory(child111.toPath(), fileAttribute).toFile().deleteOnExit();
    }
    else {
        Files.createDirectory(child1.toPath()).toFile().deleteOnExit();
        Files.createDirectory(child2.toPath()).toFile().deleteOnExit();
        Files.createDirectory(child11.toPath()).toFile().deleteOnExit();
        Files.createDirectory(child12.toPath()).toFile().deleteOnExit();
        Files.createDirectory(child21.toPath()).toFile().deleteOnExit();
        Files.createDirectory(child22.toPath()).toFile().deleteOnExit();
        Files.createDirectory(child111.toPath()).toFile().deleteOnExit();
    }
    ArrayList<File> expected = new ArrayList<>();
    expected.add(child11);
    expected.add(child12);
    //test1
    List<File> actual = PathResolver.resolvePath(
            new File(child1.getAbsolutePath() + Config.getPathSeparator() + "*"),
            new File(Config.getPathSeparator()));
    assertEquals(1, actual.size());
    //for(File f : expected)
    //    assertTrue(actual.contains(f));
    //test2
    actual = PathResolver.resolvePath(
            new File(child1.getAbsolutePath()+Config.getPathSeparator()+"child*"),
            new File(Config.getPathSeparator()));
    assertEquals(expected.size(), actual.size());
    for(File f : expected)
        assertTrue( actual.contains(f));
    //test3
    actual = PathResolver.resolvePath(
            new File(tempDir.toFile().getName()+Config.getPathSeparator()+"child*"),
            new File(Config.getTmpDir()));
    assertEquals(expected.size(), actual.size());
    assertTrue( actual.contains(child1));
    assertTrue( actual.contains(child2));
    //test4
    actual = PathResolver.resolvePath(
            new File(child1.getAbsolutePath()+Config.getPathSeparator()+"child*"+Config.getPathSeparator()+"child111"),
            new File(Config.getPathSeparator()));
    assertEquals(1, actual.size());
    assertTrue(actual.contains(child111));
}