public FifoOrderingPolicyForPendingApps() {
    List<Comparator<SchedulableEntity>> comparators =
        new ArrayList<Comparator<SchedulableEntity>>();
    comparators.add(new RecoveryComparator());
    comparators.add(new PriorityComparator());
    comparators.add(new FifoComparator());
    this.comparator = new CompoundComparator(comparators);
    this.schedulableEntities = new ConcurrentSkipListSet<S>(comparator);
  }
@Test
  public void testFifoOrderingPolicyForPendingApps() {
    FifoOrderingPolicyForPendingApps<MockSchedulableEntity> policy =
        new FifoOrderingPolicyForPendingApps<MockSchedulableEntity>();

    MockSchedulableEntity r1 = new MockSchedulableEntity();
    MockSchedulableEntity r2 = new MockSchedulableEntity();

    assertThat(policy.getComparator().compare(r1, r2)).isEqualTo(0);

    r1.setSerial(1);
    r1.setRecovering(true);
    assertThat(policy.getComparator().compare(r1, r2)).isEqualTo(-1);

    r1.setRecovering(false);
    r2.setSerial(2);
    r2.setRecovering(true);
    assertThat(policy.getComparator().compare(r1, r2)).isEqualTo(1);
  }