@@ -0,0 +1,1853 @@
+/*%0D%0A * Copyright(c) - CdC 2015, Tous droits r%C3%A9serv%C3%A9s.%0D%0A * -----------------------------------------------------------%0D%0A * Centrale de Compensation%0D%0A * Avenue Edmond-Vaucher, 18%0D%0A * Centre Informatique AVS/AI%0D%0A * Case Postale 2676%0D%0A * 1211 Gen%C3%A8ve 2%0D%0A * -----------------------------------------------------------%0D%0A */%0D%0Apackage com.batmgr.filesystem;%0D%0A%0D%0Aimport static org.junit.Assert.assertTrue;%0D%0A%0D%0Aimport java.io.IOException;%0D%0Aimport java.net.URL;%0D%0Aimport java.nio.file.Files;%0D%0Aimport java.nio.file.Path;%0D%0Aimport java.nio.file.Paths;%0D%0Aimport java.security.NoSuchAlgorithmException;%0D%0A%0D%0Aimport org.apache.commons.io.FileUtils;%0D%0Aimport org.junit.Before;%0D%0Aimport org.junit.Test;%0D%0A%0D%0Apublic class DirCheckerTest %7B%0D%0A    %0D%0A    private URL  resource;%0D%0A%0D%0A    private Path testRoot;%0D%0A%0D%0A    @Before%0D%0A    public void setUp() throws Exception %7B%0D%0A        resource = getClass().getResource(%22/sample.txt%22);%0D%0A        testRoot = Paths.get(resource.toURI()).resolve(%22..%22).normalize();%0D%0A    %7D%0D%0A    %0D%0A    private void cleanupDir(Path p) throws IOException, InterruptedException%0D%0A    %7B%0D%0A        if (Files.exists(p)) %7B%0D%0A            FileUtils.deleteDirectory(p.toFile());%0D%0A        %7D%0D%0A        Thread.sleep(1000);%0D%0A        Files.createDirectory(p);%0D%0A    %7D%0D%0A    %0D%0A    @Test%0D%0A    public void test_indexFolder() throws IOException, InterruptedException, InvalidIndexException, NoSuchAlgorithmException %7B%0D%0A        String sampleFile = %22smpl.txt%22;%0D%0A        Path testPath = testRoot.resolve(%22tst1%22);%0D%0A        cleanupDir(testPath);%0D%0A        Files.copy(testRoot.resolve(%22sample.txt%22), testPath.resolve(sampleFile));%0D%0A        DirChecker dirChecker = new DirChecker();%0D%0A        dirChecker.indexFolder(testPath);%0D%0A        DirInfo dirInfo = new DirInfo(testPath);%0D%0A        assertTrue(dirInfo.isHashPresent(%224F13A4F6083341F66D39024D7B3765387EE1A3437414CECCC774238A62C65BBA%22));%0D%0A    %7D%0D%0A    %0D%0A%7D%0D%0A

Revert "merge change from github"