SchedulingPolicy { public abstract Comparator<Schedulable> getComparator();  static SchedulingPolicy getInstance(
      Class<? extends SchedulingPolicy> clazz); @SuppressWarnings("unchecked") static SchedulingPolicy parse(String policy); @Deprecated void initialize(Resource clusterCapacity); void initialize(FSContext fsContext); abstract ResourceCalculator getResourceCalculator(); abstract String getName(); abstract Comparator<Schedulable> getComparator(); abstract void computeShares(
      Collection<? extends Schedulable> schedulables, Resource totalResources); abstract void computeSteadyShares(
      Collection<? extends FSQueue> queues, Resource totalResources); abstract boolean checkIfUsageOverFairShare(
      Resource usage, Resource fairShare); abstract Resource getHeadroom(Resource queueFairShare,
      Resource queueUsage, Resource maxAvailable); boolean isChildPolicyAllowed(SchedulingPolicy childPolicy); static final SchedulingPolicy DEFAULT_POLICY; }
@Test public void testFairShareComparatorTransitivity() { FairSharePolicy policy = new FairSharePolicy(); Comparator<Schedulable> fairShareComparator = policy.getComparator(); FairShareComparatorTester tester = new FairShareComparatorTester(fairShareComparator); tester.testTransitivity(); }