  @Test
  public void testPreHandle() throws Exception {

    MyTestWebHookAdapter adapter = new MyTestWebHookAdapter();
    WebHookSecurityInterceptor interceptor = new WebHookSecurityInterceptor();
    // set the adapter like spring would do.
    Field field = WebHookSecurityInterceptor.class.getDeclaredField("webHookAdapter");
    field.setAccessible(true);
    field.set(interceptor, adapter);
    field.setAccessible(false);
    // call the interceptor.
    interceptor.preHandle(new MockHttpServletRequest(), new MockHttpServletResponse(), null);
    // all we have to check is if the adapter was called.
    assertTrue(adapter.wasCalled("isValidRequest"));
  }