@@ -0,0 +1,2186 @@
+package org.jenkinsci.plugins.radargun.util;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Aimport org.jenkinsci.plugins.radargun.RadarGunBuilder;%0Aimport org.jenkinsci.plugins.radargun.RgBuild;%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0Aimport org.jvnet.hudson.test.JenkinsRule;%0A%0Aimport hudson.FilePath;%0Aimport hudson.model.FreeStyleBuild;%0Aimport hudson.model.FreeStyleProject;%0A%0Apublic class GetWorkspaceTest %7B%0A%0A    @Rule public JenkinsRule rule = new JenkinsRule();%0A    %0A    @Test %0A    public void testWorkspaceNull() throws Exception %7B%0A        RadarGunBuilder rgBuilder = new RadarGunBuilder(%22testRGInstall%22, null, null, null, %22SSH%22, null, null, null, null, null);%0A        FreeStyleProject project = rule.createFreeStyleProject();%0A        project.getBuildersList().add(rgBuilder);%0A        FreeStyleBuild build = project.scheduleBuild2(0).get();%0A        RgBuild rgBuild = new RgBuild(rgBuilder, build, null, null, null);%0A        FilePath ws = Functions.getRemoteWorkspace(rgBuild);%0A        assertEquals(build.getWorkspace(), ws);%0A    %7D%0A    %0A    @Test %0A    public void testWorkspaceEmpty() throws Exception %7B%0A        RadarGunBuilder rgBuilder = new RadarGunBuilder(%22testRGInstall%22, null, null, null, %22SSH%22, null, %22 %22, null, null, null);%0A        FreeStyleProject project = rule.createFreeStyleProject();%0A        project.getBuildersList().add(rgBuilder);%0A        FreeStyleBuild build = project.scheduleBuild2(0).get();%0A        RgBuild rgBuild = new RgBuild(rgBuilder, build, null, null, null);%0A        FilePath ws = Functions.getRemoteWorkspace(rgBuild);%0A        assertEquals(build.getWorkspace(), ws);%0A    %7D%0A    %0A    @Test %0A    public void testWorkspaceNonEmpty() throws Exception %7B%0A        RadarGunBuilder rgBuilder = new RadarGunBuilder(%22testRGInstall%22, null, null, null, %22SSH%22, null, %22/tmp%22, null, null, null);%0A        FreeStyleProject project = rule.createFreeStyleProject();%0A        project.getBuildersList().add(rgBuilder);%0A        FreeStyleBuild build = project.scheduleBuild2(0).get();%0A        RgBuild rgBuild = new RgBuild(rgBuilder, build, null, null, null);%0A        FilePath ws = Functions.getRemoteWorkspace(rgBuild);%0A        assertEquals(%22/tmp%22, ws.getRemote());%0A    %7D%0A%7D%0A

Create getWorkspace function tests