FileSystem fileSystem = control.createMock(FileSystem.class);
CommandRunner cmd = control.createMock(CommandRunner.class);
AppContext.RUN.cmd = cmd;
AppContext.RUN.fileSystem = fileSystem;
RepositoryConfig mockConfig = control.createMock(RepositoryConfig.class);
expect(mockConfig.getUrl()).andReturn("http://foo/svn/trunk/").anyTimes();
expect(mockConfig.getProjectSpace()).andReturn("internal").anyTimes();
expect(mockConfig.getIgnoreFileRes()).andReturn(ImmutableList.<String>of()).anyTimes();
Revision result = new Revision("45", "");
expect(fileSystem.getTemporaryDirectory("svn_writer_45_")).
andReturn(new File("/dummy/path/45"));
expect(revisionHistory.findHighestRevision("45")).andReturn(result);