Downgrade mockito, and fix tests

This commit is contained in:
Carl Mastrangelo 2015-10-28 12:57:10 -07:00
parent ac02e206e8
commit c53b5170ca
2 changed files with 3 additions and 6 deletions

View File

@ -150,7 +150,7 @@ subprojects {
// Test dependencies. // Test dependencies.
junit: 'junit:junit:4.11', 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 // Determine the correct version of Jetty ALPN boot to use based

View File

@ -36,6 +36,7 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull; import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;
import com.google.common.collect.Iterables; import com.google.common.collect.Iterables;
@ -56,9 +57,6 @@ import org.junit.Test;
import org.junit.rules.ExpectedException; import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.junit.runners.JUnit4; 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.Filter;
import java.util.logging.Level; import java.util.logging.Level;
@ -72,9 +70,8 @@ import javax.net.ssl.SSLException;
@RunWith(JUnit4.class) @RunWith(JUnit4.class)
public class ProtocolNegotiatorsTest { public class ProtocolNegotiatorsTest {
@Rule public final ExpectedException thrown = ExpectedException.none(); @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 EmbeddedChannel channel = new EmbeddedChannel();
private ChannelPipeline pipeline = channel.pipeline(); private ChannelPipeline pipeline = channel.pipeline();