public FifoOrderingPolicy() {
    List<Comparator<SchedulableEntity>> comparators =
        new ArrayList<Comparator<SchedulableEntity>>();
    comparators.add(new PriorityComparator());
    comparators.add(new FifoComparator());
    this.comparator = new CompoundComparator(comparators);
    this.schedulableEntities = new ConcurrentSkipListSet<S>(comparator);

  }
@Test
  public void testFifoOrderingPolicy() {
    FifoOrderingPolicy<MockSchedulableEntity> policy = 
      new FifoOrderingPolicy<MockSchedulableEntity>();
    MockSchedulableEntity r1 = new MockSchedulableEntity();
    MockSchedulableEntity r2 = new MockSchedulableEntity();

    assertEquals("The comparator should return 0 because the entities are created with " +
            "the same values.", 0,
        policy.getComparator().compare(r1, r2));
    
    r1.setSerial(1);
    assertEquals("The lhs entity has a larger serial, the comparator return " +
            "value should be 1.", 1, policy.getComparator().compare(r1, r2));
    
    r2.setSerial(2);
    Assert.assertEquals("The rhs entity has a larger serial, the comparator return " +
        "value should be -1.", -1, policy.getComparator().compare(r1, r2));
  }