@@ -0,0 +1,1383 @@
+package org.jenkinsci.plugins.radargun.util;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertTrue;%0Aimport hudson.FilePath;%0A%0Aimport java.io.File;%0A%0Aimport org.junit.Test;%0A%0A/**%0A * %0A * @author vjuranek%0A *%0A */%0Apublic class FunctionsTest %7B%0A    %0A    @Test%0A    public void testConvertWsToCanonicalPath() throws Exception %7B%0A        File f = new File(%22test.txt%22);%0A        String canonPath = Functions.convertWsToCanonicalPath(new FilePath(f));%0A        assertEquals(f.getCanonicalPath(), canonPath);%0A    %7D%0A    %0A    @Test%0A    public void testCmdArrayToString() %7B%0A        String%5B%5D cmd = %7B%22aaa%22, %22bbb%22, %22ccc%22%7D;%0A        assertEquals(%22aaa bbb ccc%22, Functions.cmdArrayToString(cmd));%0A        cmd = new String%5B%5D %7B%22aaa%22%7D;%0A        assertEquals(%22aaa%22, Functions.cmdArrayToString(cmd));%0A        cmd = new String%5B%5D %7B%22aaa%22, %22'bbb'%22%7D;%0A        assertEquals(%22aaa 'bbb'%22, Functions.cmdArrayToString(cmd));%0A        cmd = new String%5B%5D %7B%22aaa; bbb%22, %22ccc%22%7D;%0A        assertEquals(%22aaa; bbb ccc%22, Functions.cmdArrayToString(cmd));%0A    %7D%0A    %0A    @Test%0A    public void testMakeExecutable() throws Exception %7B%0A        File f = File.createTempFile(%22test%22, %22.sh%22);%0A        Functions.makeExecutable(f.getAbsolutePath());%0A        assertTrue(f.canExecute());%0A        %0A        Process p = new ProcessBuilder(f.getAbsolutePath()).start();%0A        assertEquals(0, p.waitFor());%0A    %7D%0A    %0A%0A%7D%0A

Implement tests for Functions class