public void prepareMockWorkspace() throws IOException {
workspace = Files.newTemporaryFolder();
moduleDir = new File(workspace, "trunk");
FileUtils.forceMkdir(moduleDir);
args = new ArgumentListBuilder();
argsBuilder = new ExtendedArgumentListBuilder(args, false);
AbstractProject<?, ?> p = mock(AbstractProject.class);
SCM scm = mock(SCM.class);
FilePath workspacePath = new FilePath(workspace);
when(scm.getModuleRoot(eq(workspacePath), any(AbstractBuild.class))).thenReturn(new FilePath(moduleDir));
when(p.getScm()).thenReturn(scm);