From c53b5170ca6c23dbe333fd86528cd73d81455819 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 28 Oct 2015 12:57:10 -0700 Subject: [PATCH] Downgrade mockito, and fix tests --- build.gradle | 2 +- .../test/java/io/grpc/netty/ProtocolNegotiatorsTest.java | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index 2107af6743..1e1ceed027 100644 --- a/build.gradle +++ b/build.gradle @@ -150,7 +150,7 @@ subprojects { // Test dependencies. junit: 'junit:junit:4.11', - mockito: 'org.mockito:mockito-core:1.10.19' + mockito: 'org.mockito:mockito-core:1.9.5' ] // Determine the correct version of Jetty ALPN boot to use based diff --git a/netty/src/test/java/io/grpc/netty/ProtocolNegotiatorsTest.java b/netty/src/test/java/io/grpc/netty/ProtocolNegotiatorsTest.java index 4d74501d4a..135d31e0e9 100644 --- a/netty/src/test/java/io/grpc/netty/ProtocolNegotiatorsTest.java +++ b/netty/src/test/java/io/grpc/netty/ProtocolNegotiatorsTest.java @@ -36,6 +36,7 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.mock; import com.google.common.collect.Iterables; @@ -56,9 +57,6 @@ import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -import org.mockito.Mock; -import org.mockito.junit.MockitoJUnit; -import org.mockito.junit.MockitoRule; import java.util.logging.Filter; import java.util.logging.Level; @@ -72,9 +70,8 @@ import javax.net.ssl.SSLException; @RunWith(JUnit4.class) public class ProtocolNegotiatorsTest { @Rule public final ExpectedException thrown = ExpectedException.none(); - @Rule public final MockitoRule mocks = MockitoJUnit.rule(); - @Mock private ChannelHandler grpcHandler; + private ChannelHandler grpcHandler = mock(ChannelHandler.class); private EmbeddedChannel channel = new EmbeddedChannel(); private ChannelPipeline pipeline = channel.pipeline();