diff --git a/org.springframework.integration.adapter/src/test/java/org/springframework/integration/adapter/ftp/FtpSourceTests.java b/org.springframework.integration.adapter/src/test/java/org/springframework/integration/adapter/ftp/FtpSourceTests.java index 121e6908a8..313719110f 100644 --- a/org.springframework.integration.adapter/src/test/java/org/springframework/integration/adapter/ftp/FtpSourceTests.java +++ b/org.springframework.integration.adapter/src/test/java/org/springframework/integration/adapter/ftp/FtpSourceTests.java @@ -1,10 +1,34 @@ +/* + * Copyright 2002-2008 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.springframework.integration.adapter.ftp; -import static org.easymock.classextension.EasyMock.*; -import static org.junit.Assert.*; +import static org.easymock.EasyMock.anyInt; +import static org.easymock.EasyMock.eq; +import static org.easymock.EasyMock.expect; +import static org.easymock.EasyMock.getCurrentArguments; +import static org.easymock.EasyMock.isA; +import static org.easymock.classextension.EasyMock.createMock; +import static org.easymock.classextension.EasyMock.replay; +import static org.easymock.classextension.EasyMock.reset; +import static org.easymock.classextension.EasyMock.verify; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; import java.io.File; -import java.io.FileFilter; import java.io.FilenameFilter; import java.io.OutputStream; import java.util.ArrayList; @@ -16,10 +40,8 @@ import org.apache.commons.net.ftp.FTPClient; import org.apache.commons.net.ftp.FTPFile; import org.apache.oro.io.Perl5FilenameFilter; import org.easymock.IAnswer; -import org.junit.After; import org.junit.AfterClass; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import org.springframework.integration.message.GenericMessage; import org.springframework.integration.message.Message; @@ -46,8 +68,6 @@ public class FtpSourceTests { private Long size = 100l; - private File testDir = new File(this.getClass().getName()); - @Before public void initializeFtpSource() { ftpSource = new FtpSource(messageCreator, ftpClient); @@ -75,7 +95,7 @@ public class FtpSourceTests { expect(ftpClient.retrieveFile(eq("test"), isA(OutputStream.class))).andReturn(true); // create message expect(messageCreator.createMessage(isA(List.class))).andReturn( - new GenericMessage(Arrays.asList(new File("test")))); + new GenericMessage(Arrays.asList(new File("test1")))); ftpClient.disconnect(); replay(globalMocks); ftpSource.onSend(ftpSource.receive());