use of org.mockito.internal.verification.api.VerificationData in project cdap-ingest by caskdata.
the class RestClientTest method testNotAllowedResponseCodeAnalysis.
@Test
public void testNotAllowedResponseCodeAnalysis() {
StatusLine statusLine = new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), HttpStatus.SC_METHOD_NOT_ALLOWED, "Method Not Allowed");
when(response.getStatusLine()).thenReturn(statusLine);
TestUtils.verifyResponse(HttpStatus.SC_METHOD_NOT_ALLOWED, response);
verify(response, new VerificationMode() {
@Override
public void verify(VerificationData verificationData) {
Assert.assertEquals(2, verificationData.getAllInvocations().size());
}
}).getStatusLine();
}
Aggregations