public BrokerSetResolutionHelper(Cluster cluster, BrokerSetResolver brokerSetResolver) throws BrokerSetResolutionException {
    initializeBrokerSetMappings(getRackIdByBrokerIdMapping(cluster), brokerSetResolver);
  }
@Test
  public void testBrokerSetResolutionHelper() throws BrokerSetResolutionException {
    ClusterModel clusterModel = DeterministicCluster.brokerSetSatisfiable1();
    Map<String, Set<Integer>> testBrokerSetMapping = Map.of("BS1", Set.of(0), "BS2", Set.of(1, 2), "BS3", Set.of(3, 4), "BS4", Set.of(5));

    BrokerSetResolver brokerSetResolver = EasyMock.createNiceMock(BrokerSetResolver.class);
    EasyMock.expect(brokerSetResolver.brokerIdsByBrokerSetId(BrokerSetResolutionHelper.getRackIdByBrokerIdMapping(clusterModel)))
            .andReturn(testBrokerSetMapping);
    EasyMock.replay(brokerSetResolver);

    BrokerSetResolutionHelper brokerSetResolutionHelper = new BrokerSetResolutionHelper(clusterModel, brokerSetResolver);

    assertEquals("BS1", brokerSetResolutionHelper.brokerSetId(0));
    assertEquals("BS2", brokerSetResolutionHelper.brokerSetId(1));
    assertEquals("BS2", brokerSetResolutionHelper.brokerSetId(2));
    assertEquals("BS3", brokerSetResolutionHelper.brokerSetId(3));
    assertEquals("BS3", brokerSetResolutionHelper.brokerSetId(4));
    assertEquals("BS4", brokerSetResolutionHelper.brokerSetId(5));
  }