diff --git a/spring-integration-file/src/test/java/org/springframework/integration/file/remote/StreamingInboundTests.java b/spring-integration-file/src/test/java/org/springframework/integration/file/remote/StreamingInboundTests.java index 6f667d4f3d..1de388d668 100644 --- a/spring-integration-file/src/test/java/org/springframework/integration/file/remote/StreamingInboundTests.java +++ b/spring-integration-file/src/test/java/org/springframework/integration/file/remote/StreamingInboundTests.java @@ -98,6 +98,7 @@ public class StreamingInboundTests { streamer.setRemoteDirectory("/bad"); streamer.afterPropertiesSet(); streamer.start(); + streamer.receive(); } @Test @@ -226,14 +227,9 @@ public class StreamingInboundTests { public static class StringSessionFactory implements SessionFactory { - private Session singletonSession; - @SuppressWarnings("unchecked") @Override public Session getSession() { - if (this.singletonSession != null) { - return this.singletonSession; - } try { Session session = mock(Session.class); willReturn(new String[] { "/foo/foo", "/foo/bar" }).given(session).list("/foo"); @@ -253,9 +249,6 @@ public class StreamingInboundTests { willThrow(new IOException("No file")).given(session).readRaw("/bad/file2"); given(session.finalizeRaw()).willReturn(true); - - this.singletonSession = session; - return session; } catch (Exception e) {