@Test
public void testTimeout() throws Exception {

  final TimeoutStrategy strategy = new TimeoutStrategy(Time.of(1000L, TimeUnit.MILLISECONDS));
  final RequestMethod<Integer> method = new RequestMethod<Integer>() {
    @Override
    public String getName() {
      return null;
    }
    @Override
    protected Integer runInternal(List<Object> parameters) throws Exception {
      return 0;
    }
  };
  final Invocation<Integer> invocation = strategy.apply(method.toInvocation());
  invocation.invoke();
}