if(!request.getMethod().equalsIgnoreCase(httpMethod))
throw new IllegalArgumentException(String.format("Expected %s, but was %s", httpMethod, request.getMethod()));
if(request.getURI().toString().equals(uri)) {
HttpResponse response = new BasicHttpResponse(new ProtocolVersion("HTTP", 1, 1), 200, "OK");
BasicHttpEntity entity = new BasicHttpEntity();
if(contentLocation != null)
response.addHeader(new BasicHeader("Content-Location", contentLocation));
entity.setContentEncoding(charset);
entity.setContentType(this.contentType);
entity.setContent(this.body);
response.setEntity(new BufferedHttpEntity(entity));
assertParameters(request);
assertHeaders(request);