}
@Test
public void testCopyDir() throws Exception {
FileWrapper[] listOfFiles = new FileWrapper[1];
FileWrapper mockFwJarFileWrapper = mockHelper.createMock("mockFwJarFileWrapper",FileWrapper.class);
listOfFiles[0] = mockFwJarFileWrapper;
expect(mockFwJarFileWrapper.exists()).andStubReturn(true);
expect(mockFwJarFileWrapper.getName()).andReturn("fw.jar");
expect(mockFwJarFileWrapper.getAbsolutePath()).andStubReturn("/squirrellibdir/test/path/fw.jar");
expect(mockSquiirelLibDir.listFiles()).andStubReturn(listOfFiles);
FileWrapper mockFwJarFileInDownloadsWrapper =
mockHelper.createMock("mockFwJarFileInDownloadsWrapper", FileWrapper.class);
expect(mockFwJarFileInDownloadsWrapper.getAbsolutePath()).andStubReturn("/downloads/test/path/fw.jar");
expect(mockFwJarFileInDownloadsWrapper.exists()).andReturn(false);
expect(mockFileWrapperFactory.create(mockDownloadsCoreDirectory, "fw.jar"));
expectLastCall().andReturn(mockFwJarFileInDownloadsWrapper);
mockIOUtilities.copyFile(mockFwJarFileWrapper, mockFwJarFileInDownloadsWrapper);