diff --git a/spring-integration-core/src/test/java/org/springframework/integration/channel/QueueChannelTests.java b/spring-integration-core/src/test/java/org/springframework/integration/channel/QueueChannelTests.java index 7e4ba31fcf..44f63fcca5 100644 --- a/spring-integration-core/src/test/java/org/springframework/integration/channel/QueueChannelTests.java +++ b/spring-integration-core/src/test/java/org/springframework/integration/channel/QueueChannelTests.java @@ -16,16 +16,10 @@ package org.springframework.integration.channel; -import static org.hamcrest.Matchers.startsWith; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; -import static org.mockito.Mockito.spy; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; import java.io.IOException; import java.util.List; @@ -35,16 +29,12 @@ import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; -import org.apache.commons.logging.Log; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; -import org.mockito.ArgumentCaptor; -import org.springframework.beans.DirectFieldAccessor; import org.springframework.integration.selector.UnexpiredMessageSelector; import org.springframework.integration.support.MessageBuilder; -import org.springframework.integration.test.util.TestUtils; import org.springframework.messaging.Message; import org.springframework.messaging.support.GenericMessage; @@ -64,10 +54,6 @@ public class QueueChannelTests { final AtomicBoolean messageReceived = new AtomicBoolean(false); final CountDownLatch latch = new CountDownLatch(1); final QueueChannel channel = new QueueChannel(); - Log logger = spy(TestUtils.getPropertyValue(channel, "logger", Log.class)); - when(logger.isDebugEnabled()).thenReturn(true); - when(logger.isTraceEnabled()).thenReturn(true); - new DirectFieldAccessor(channel).setPropertyValue("logger", logger); new Thread(new Runnable() { @Override public void run() { @@ -82,12 +68,6 @@ public class QueueChannelTests { channel.send(new GenericMessage("testing")); latch.await(1000, TimeUnit.MILLISECONDS); assertTrue(messageReceived.get()); - ArgumentCaptor preCaptor = ArgumentCaptor.forClass(String.class); - ArgumentCaptor postCaptor = ArgumentCaptor.forClass(String.class); - verify(logger).trace(preCaptor.capture()); - verify(logger, times(3)).debug(postCaptor.capture()); - assertThat(preCaptor.getValue(), startsWith("preReceive")); - assertThat(postCaptor.getValue(), startsWith("postReceive")); } @Test