@Override
  public void onSuccess(T result) {
    markTimings();
    _callback.onSuccess(result);
  }
@Test
  public void testOrdering()
  {
    final RequestContext requestContext = new RequestContext();
    final Callback<Long> callback = new Callback<Long>()
    {
      @Override
      public void onSuccess(Long result)
      {
        Map<TimingKey, TimingContextUtil.TimingContext> timings = TimingContextUtil.getTimingsMap(requestContext);

        // Ensure all keys are present
        Assert.assertTrue(timings.containsKey(KEY_H));
        Assert.assertTrue(timings.containsKey(KEY_M));
        Assert.assertTrue(timings.containsKey(KEY_L));

        // Ensure timing start times/durations are consistent based on their ordering in the callback
        TimingContextUtil.TimingContext contextH = timings.get(KEY_H);
        TimingContextUtil.TimingContext contextM = timings.get(KEY_M);
        TimingContextUtil.TimingContext contextL = timings.get(KEY_L);
        Assert.assertTrue(contextM.getStartTimeNano() < contextL.getStartTimeNano());
        Assert.assertTrue(contextL.getStartTimeNano() < contextH.getStartTimeNano());
        Assert.assertTrue(contextL.getDurationNano() < contextM.getDurationNano());
        Assert.assertTrue(contextH.getDurationNano() < contextM.getDurationNano());
      }

      @Override
      public void onError(Throwable e) {}
    };

    final Callback<Long> timingCallback = new TimingCallback.Builder<>(callback, requestContext)
        .addBeginTimingKey(KEY_M)
        .addBeginTimingKey(KEY_L)
        .addEndTimingKey(KEY_L)
        .addBeginTimingKey(KEY_H)
        .addEndTimingKey(KEY_H)
        .addEndTimingKey(KEY_M)
        .build();

    timingCallback.onSuccess(1L);
  }