@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);
}