final Map<String, String> queryParameters,
final String httpHeaderName, final String httpHeaderValue,
final String requestContentType,
final HttpStatusCodes expectedStatusCode) throws ODataException {
ODataServiceFactory serviceFactory = mock(ODataServiceFactory.class);
final ODataService service = mockODataService(serviceFactory);
when(serviceFactory.createService(any(ODataContext.class))).thenReturn(service);
final ODataRequest request = mockODataRequest(method, pathSegments, queryParameters,
httpHeaderName, httpHeaderValue, requestContentType);
final ODataContextImpl context = new ODataContextImpl(request, serviceFactory);