return new UnauthorizedStubResponse();
}
}
if (foundStubHttpLifecycle.getResponse().getHeaders().containsKey("location")) {
final RedirectStubResponse redirectStubResponse = new RedirectStubResponse();
redirectStubResponse.setLatency(foundStubHttpLifecycle.getResponse().getLatency());
redirectStubResponse.setBody(foundStubHttpLifecycle.getResponse().getBody());
redirectStubResponse.setStatus(foundStubHttpLifecycle.getResponse().getStatus());
redirectStubResponse.setHeaders(foundStubHttpLifecycle.getResponse().getHeaders());
return redirectStubResponse;
}
return foundStubHttpLifecycle.getResponse();