}
public Observable<Void> simulateTimeout(HttpServerRequest<ByteBuf> httpRequest, final HttpServerResponse<ByteBuf> response) {
String uri = httpRequest.getUri();
QueryStringDecoder decoder = new QueryStringDecoder(uri);
List<String> timeout = decoder.parameters().get("timeout");
if (null != timeout && !timeout.isEmpty()) {
// Do not use Thread.sleep() here as that blocks the eventloop and since by default the eventloop is shared,
// a few of these timeout requests can just cause failures in other tests (if running parallely)
return Observable.interval(Integer.parseInt(timeout.get(0)), TimeUnit.MILLISECONDS)
.flatMap(new Func1<Long, Observable<Void>>() {