class RoutingService {

    public boolean redirectRequestToStub(final WilmaHttpRequest request) {
        boolean redirect;
        ResponseDescriptorDTO responseDescriptorDTO = stubDescriptorEvaluator.findResponseDescriptor(stubDescriptors, request);
        if (responseDescriptorDTO == null) {
            responseDescriptorDTO = stubModeEvaluator.getResponseDescriptorForStubMode(request, operationMode);
        }
        redirect = responseDescriptorDTO != null;
        if (redirect) {
            //need to add this extra header, helping the stub to identify the response
            request.addHeaderUpdate(WilmaHttpEntity.WILMA_LOGGER_ID, request.getWilmaMessageId());
            saveInResponseDescriptorMap(request, responseDescriptorDTO);
        }
        return redirect;
    }

}