Don't use MockitoJUnitRunner

Replace `@RunWith(MockitoJUnitRunner.class)` with direct Mockito
initialization since the running doesn't support parallel test
execution.
This commit is contained in:
Phillip Webb
2016-06-09 20:55:59 -07:00
parent 77f6b4c983
commit 99c6194e17
11 changed files with 57 additions and 39 deletions

View File

@@ -22,9 +22,8 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import org.mockito.MockitoAnnotations;
import org.springframework.http.HttpRequest;
import org.springframework.http.client.ClientHttpRequestExecution;
@@ -41,7 +40,6 @@ import static org.mockito.BDDMockito.given;
* @author Rob Winch
* @since 1.3.0
*/
@RunWith(MockitoJUnitRunner.class)
public class HttpHeaderInterceptorTests {
@Rule
@@ -66,7 +64,8 @@ public class HttpHeaderInterceptorTests {
private MockHttpServletRequest httpRequest;
@Before
public void setup() throws IOException {
public void setup() throws Exception {
MockitoAnnotations.initMocks(this);
this.body = new byte[] {};
this.httpRequest = new MockHttpServletRequest();
this.request = new ServletServerHttpRequest(this.httpRequest);