CustomRebalancerContext context = new CustomRebalancerContext();
context.setAnyLiveParticipant(false);
context.setMaxPartitionsPerParticipant(Integer.MAX_VALUE);
Map<PartitionId, Partition> partitionMap = Maps.newHashMap();
ResourceId resourceId = ResourceId.from("testResource");
PartitionId partitionId = PartitionId.from(resourceId, "0");
partitionMap.put(partitionId, new Partition(partitionId));
context.setPartitionMap(partitionMap);
Map<PartitionId, Map<ParticipantId, State>> preferenceMaps = Maps.newHashMap();
ParticipantId participant1 = ParticipantId.from("participant1");
ParticipantId participant2 = ParticipantId.from("participant2");