@Override
  public void onSuccess(T result) {
    markTimings();
    _callback.onSuccess(result);
  }
@Test(dataProvider = "timingImportanceThreshold")
  public void testBuilder(TimingImportance timingImportanceThreshold)
  {
    final RequestContext requestContext = new RequestContext();
    if (timingImportanceThreshold != null)
    {
      requestContext.putLocalAttr(TimingContextUtil.TIMING_IMPORTANCE_THRESHOLD_KEY_NAME, timingImportanceThreshold);
    }

    final Callback<Long> callback = new Callback<Long>()
    {
      @Override
      public void onSuccess(Long result)
      {
        Map<TimingKey, TimingContextUtil.TimingContext> timings = TimingContextUtil.getTimingsMap(requestContext);
        // Ensure that keys have been filtered out correctly
        if (timingImportanceThreshold == null || TimingImportance.LOW.isAtLeast(timingImportanceThreshold))
        {
          Assert.assertTrue(timings.containsKey(KEY_L));
          Assert.assertTrue(timings.containsKey(KEY_M));
        }
        else if (TimingImportance.MEDIUM.isAtLeast(timingImportanceThreshold))
        {
          Assert.assertFalse(timings.containsKey(KEY_L));
          Assert.assertTrue(timings.containsKey(KEY_M));
        }
        else
        {
          Assert.assertFalse(timings.containsKey(KEY_L));
          Assert.assertFalse(timings.containsKey(KEY_M));
        }
      }

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

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

    // Ensure that the builder can correctly determine when to return the original callback
    if (timingImportanceThreshold == null || !timingImportanceThreshold.equals(TimingImportance.HIGH))
    {
      Assert.assertTrue(timingCallback instanceof TimingCallback);
    }
    else
    {
      Assert.assertFalse(timingCallback instanceof TimingCallback);
    }

    timingCallback.onSuccess(1L);
  }