@Test
  public void operationClassTest() {
    Properties props = new Properties();
    props.setProperty("router.hostname", "localhost");
    props.setProperty("router.datacenter.name", "dc-0");
    props.setProperty("router.get.success.target", "1");
    props.setProperty("router.put.success.target", "2");
    props.setProperty("router.delete.success.target", "2");
    props.setProperty("router.ttl.update.success.target", "2");
    RouterConfig routerConfig = new RouterConfig(new VerifiableProperties(props));
    initialize();
    NonBlockingRouterMetrics routerMetrics = new NonBlockingRouterMetrics(mockClusterMap, routerConfig);
    Map<RouterOperation, Integer> operationAndSuccessTarget = new HashMap<>();
    operationAndSuccessTarget.put(RouterOperation.GetBlobOperation, 1);
    operationAndSuccessTarget.put(RouterOperation.GetBlobInfoOperation, 1);
    operationAndSuccessTarget.put(RouterOperation.PutOperation, 2);
    operationAndSuccessTarget.put(RouterOperation.DeleteOperation, 2);
    operationAndSuccessTarget.put(RouterOperation.TtlUpdateOperation, 2);
    for (Map.Entry<RouterOperation, Integer> entry : operationAndSuccessTarget.entrySet()) {
      SimpleOperationTracker operationTracker = null;
      switch (operationTrackerType) {
        case SIMPLE_OP_TRACKER:
          operationTracker =
              new SimpleOperationTracker(routerConfig, entry.getKey(), mockPartition, originatingDcName, true,
                  routerMetrics);
          break;
        case ADAPTIVE_OP_TRACKER:
          try {
            operationTracker = new AdaptiveOperationTracker(routerConfig, routerMetrics, entry.getKey(), mockPartition,
                originatingDcName, time);
          } catch (IllegalArgumentException e) {
            assertTrue("Get operation shouldn't throw any exception in adaptive tracker",
                entry.getKey() != RouterOperation.GetBlobOperation
                    && entry.getKey() != RouterOperation.GetBlobInfoOperation);
          }
          break;
      }
      // ensure the success target matches the number specified for each type of operaiton
      if (operationTracker != null) {
        assertEquals("The suggest target doesn't match", (long) entry.getValue(), operationTracker.getSuccessTarget());
      }
    }
  }
Test that operation tracker can correctly populate parameters(i.e. successTarget) based on input {@link RouterOperation}.
ambry-router/src/test/java/com/github/ambry/router/OperationTrackerTest.java