SortedReplicas(Broker broker,
                 Set<Function<Replica, Boolean>> selectionFuncs,
                 List<Function<Replica, Integer>> priorityFuncs,
                 Function<Replica, Double> scoreFunction) {
    this(broker, null, selectionFuncs, priorityFuncs, scoreFunction, true);
  }
@Test
  public void testPriorityFunction() {
    Broker broker = generateBroker(NUM_REPLICAS);
    new SortedReplicasHelper().addPriorityFunc(PRIORITY_FUNC)
                              .setScoreFunc(SCORE_FUNC)
                              .trackSortedReplicasFor(SORT_NAME, broker);
    SortedReplicas sr = broker.trackedSortedReplicas(SORT_NAME);

    assertEquals(NUM_REPLICAS, sr.sortedReplicas(false).size());

    verifySortedReplicas(sr);
  }