HttpResponse httpResponse = new HttpResponse().withBody("some_response_body");
HttpForward httpForward = new HttpForward().withHost("some_host");
HttpCallback httpCallback = new HttpCallback().withCallbackClass("some_class");
// when
Expectation expectationWithResponse = new ExpectationDTO(new Expectation(httpRequest, Times.exactly(3)).thenRespond(httpResponse)).buildObject();
// then
assertThat(expectationWithResponse.getHttpRequest(), is(httpRequest));
assertThat(expectationWithResponse.getTimes(), is(Times.exactly(3)));
assertThat(expectationWithResponse.getHttpResponse(false), is(httpResponse));
assertNull(expectationWithResponse.getHttpForward());
assertNull(expectationWithResponse.getHttpCallback());
// when
Expectation expectationWithForward = new ExpectationDTO(new Expectation(httpRequest, Times.exactly(3)).thenForward(httpForward)).buildObject();
// then
assertThat(expectationWithForward.getHttpRequest(), is(httpRequest));
assertThat(expectationWithForward.getTimes(), is(Times.exactly(3)));
assertNull(expectationWithForward.getHttpResponse(false));
assertThat(expectationWithForward.getHttpForward(), is(httpForward));
assertNull(expectationWithForward.getHttpCallback());
// when
Expectation expectationWithCallback = new ExpectationDTO(new Expectation(httpRequest, Times.exactly(3)).thenCallback(httpCallback)).buildObject();
// then
assertThat(expectationWithCallback.getHttpRequest(), is(httpRequest));
assertThat(expectationWithCallback.getTimes(), is(Times.exactly(3)));
assertNull(expectationWithCallback.getHttpResponse(false));
assertNull(expectationWithCallback.getHttpForward());
assertThat(expectationWithCallback.getHttpCallback(), is(httpCallback));
}