@Test
  public void severityOrderingTest() {
    // 1. test that Reject > Allow
    Assert.assertTrue(QuotaAction.REJECT.compareTo(QuotaAction.ALLOW) > 0);

    // 2. test that Reject > Delay
    Assert.assertTrue(QuotaAction.REJECT.compareTo(QuotaAction.DELAY) > 0);

    // 3. test that Delay > Allow
    Assert.assertTrue(QuotaAction.DELAY.compareTo(QuotaAction.ALLOW) > 0);

    // 4. test that Delay < Reject
    Assert.assertTrue(QuotaAction.DELAY.compareTo(QuotaAction.REJECT) < 0);

    // 5. test that Allow < Reject
    Assert.assertTrue(QuotaAction.ALLOW.compareTo(QuotaAction.REJECT) < 0);

    // 6. test that Allow < Delay
    Assert.assertTrue(QuotaAction.ALLOW.compareTo(QuotaAction.DELAY) < 0);
  }
Tests that {@link QuotaAction#compareTo} returns correct ordering.
ambry-api/src/test/java/com/github/ambry/quota/QuotaActionSeverityTest.java