import cosm0s.stats4was.utils.UtilsFile;
import org.junit.Test;

import java.util.LinkedList;
import java.util.List;

import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertFalse;

public class UtilsFileTest {

    @Test
    public void checkFileTest(){

        String properties = "resources/conf/soap.properties";
        String stats4was = "resources/conf/stats4was.properties";

        int valorEntero = (int) Math.floor(Math.random()*(0-1000000+1)+1000000);
        String falseProperties = "C://props"+ valorEntero +".properties";

        assertTrue(UtilsFile.checkFile(properties));
        assertTrue(UtilsFile.checkFile(stats4was));
        assertFalse(UtilsFile.checkFile(falseProperties));

        List<String> testList = new LinkedList<String>();
        testList.add(properties);
        testList.add(stats4was);
        testList.add(falseProperties);

        assertFalse(UtilsFile.checkFile(testList));

        testList.remove(falseProperties);

        assertTrue(UtilsFile.checkFile(testList));


    }

    @Test(expected=NullPointerException.class)
    public void testPrintNull(){
        UtilsFile.print("", null);
    }

}

@@ -1,12 +1,57 @@
+import cosm0s.stats4was.utils.DaemonContext;%0A
 import cosm0
@@ -79,16 +79,17 @@
 lsFile;%0A
+%0A
 import o
@@ -285,16 +285,16 @@
   @Test%0A
-
     publ
@@ -317,16 +317,266 @@
 eTest()%7B
+%0A        DaemonContext.instance().setProperty(%22LogFormat%22, %22%25d %5B%25p%7C%25c%7C%25C%7B1%7D%5D %25m%25n%22);%0A        DaemonContext.instance().setProperty(%22LogLevel%22, %22%25d %5B%25-5p%5D%5B%25r%5D %25t %7C %25x %5B%25c%5D %25m%25n%22);%0A        DaemonContext.instance().setProperty(%22LogGetLogger%22, %22default%22);
 %0A%0A      

Test for Travis CI