// Path: src/main/java/io/cdap/http/internal/HandlerInfo.java
// public class HandlerInfo {
//   private final String handlerName;
//   private final String methodName;
// 
//   public HandlerInfo(String handlerName, String methodName) {
//     this.handlerName = handlerName;
//     this.methodName = methodName;
//   }
// 
//   public String getHandlerName() {
//     return handlerName;
//   }
// 
//   public String getMethodName() {
//     return methodName;
//   }
// }


import io.cdap.http.internal.HandlerInfo;
import io.netty.handler.codec.http.HttpRequest;
import io.netty.handler.codec.http.HttpResponseStatus;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.net.HttpURLConnection;
import java.net.URI;
import java.net.URL;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.CyclicBarrier;
import java.util.concurrent.TimeUnit;
  }

  private void awaitPostHook() throws Exception {
    handlerHook1.awaitPost();
    handlerHook2.awaitPost();
  }

  private static class TestHandlerHook extends AbstractHandlerHook {
    private volatile int numPreCalls = 0;
    private volatile int numPostCalls = 0;
    private final CyclicBarrier postBarrier = new CyclicBarrier(2);

    public int getNumPreCalls() {
      return numPreCalls;
    }

    public int getNumPostCalls() {
      return numPostCalls;
    }

    public void reset() {
      numPreCalls = 0;
      numPostCalls = 0;
    }

    public void awaitPost() throws Exception {
      postBarrier.await();
    }

    @Override
// Path: src/main/java/io/cdap/http/internal/HandlerInfo.java
// public class HandlerInfo {
//   private final String handlerName;
//   private final String methodName;
// 
//   public HandlerInfo(String handlerName, String methodName) {
//     this.handlerName = handlerName;
//     this.methodName = methodName;
//   }
// 
//   public String getHandlerName() {
//     return handlerName;
//   }
// 
//   public String getMethodName() {
//     return methodName;
//   }
// }


// Path: src/test/java/io/cdap/http/HandlerHookTest.java
import io.cdap.http.internal.HandlerInfo;
import io.netty.handler.codec.http.HttpRequest;
import io.netty.handler.codec.http.HttpResponseStatus;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.net.HttpURLConnection;
import java.net.URI;
import java.net.URL;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.CyclicBarrier;
import java.util.concurrent.TimeUnit;

  }

  private void awaitPostHook() throws Exception {
    handlerHook1.awaitPost();
    handlerHook2.awaitPost();
  }

  private static class TestHandlerHook extends AbstractHandlerHook {
    private volatile int numPreCalls = 0;
    private volatile int numPostCalls = 0;
    private final CyclicBarrier postBarrier = new CyclicBarrier(2);

    public int getNumPreCalls() {
      return numPreCalls;
    }

    public int getNumPostCalls() {
      return numPostCalls;
    }

    public void reset() {
      numPreCalls = 0;
      numPostCalls = 0;
    }

    public void awaitPost() throws Exception {
      postBarrier.await();
    }

    @Override
    public boolean preCall(HttpRequest request, HttpResponder responder, HandlerInfo handlerInfo) {