@Override
    public void prepare(ExecutorDetails exec) {
        this.exec = exec;
    }
@Test
    void testWithBlackListedHosts() {
        INimbus iNimbus = new INimbusTest();
        double compPcore = 100;
        double compOnHeap = 775;
        double compOffHeap = 25;
        int topo1NumSpouts = 1;
        int topo1NumBolts = 5;
        int topo1SpoutParallelism = 100;
        int topo1BoltParallelism = 200;
        final int numSupersPerRack = 10;
        final int numPortsPerSuper = 66;
        long compPerRack = (topo1NumSpouts * topo1SpoutParallelism + topo1NumBolts * topo1BoltParallelism + 10);
        long compPerSuper =  compPerRack / numSupersPerRack;
        double cpuPerSuper = compPcore * compPerSuper;
        double memPerSuper = (compOnHeap + compOffHeap) * compPerSuper;
        double topo1MaxHeapSize = memPerSuper;
        final String topoName1 = "topology1";
        int numRacks = 3;

        Map<String, SupervisorDetails> supMap = genSupervisorsWithRacks(numRacks, numSupersPerRack,  numPortsPerSuper,
            0, 0, cpuPerSuper, memPerSuper, new HashMap<>());
        TestDNSToSwitchMapping testDNSToSwitchMapping = new TestDNSToSwitchMapping(supMap.values());

        Config config = new Config();
        config.putAll(createGrasClusterConfig(compPcore, compOnHeap, compOffHeap, null, null));
        config.put(Config.TOPOLOGY_SCHEDULER_STRATEGY, GenericResourceAwareStrategy.class.getName());

        IScheduler scheduler = new ResourceAwareScheduler();
        scheduler.prepare(config, new StormMetricsRegistry());

        TopologyDetails td1 = genTopology(topoName1, config, topo1NumSpouts,
            topo1NumBolts, topo1SpoutParallelism, topo1BoltParallelism, 0, 0, "user", topo1MaxHeapSize);

        Topologies topologies = new Topologies(td1);
        Cluster cluster = new Cluster(iNimbus, new ResourceMetrics(new StormMetricsRegistry()), supMap, new HashMap<>(), topologies, config);
        cluster.setNetworkTopography(testDNSToSwitchMapping.getRackToHosts());

        Map<String, List<String>> networkTopography = cluster.getNetworkTopography();
        assertEquals(numRacks, networkTopography.size(), "Expecting " + numRacks + " racks found " + networkTopography.size());
        assertTrue(networkTopography.size() >= 3, "Expecting racks count to be >= 3, found " + networkTopography.size());

        Set<String> blackListedHosts = new HashSet<>();
        List<SupervisorDetails> supArray = new ArrayList<>(supMap.values());
        for (int i = 0 ; i < numSupersPerRack ; i++) {
            blackListedHosts.add(supArray.get(i).getHost());
        }
        blacklistHostsAndSortNodes(blackListedHosts, supMap.values(), cluster, td1);

        String rackToClear = cluster.getNetworkTopography().keySet().stream().findFirst().get();
        blackListedHosts = new HashSet<>(cluster.getNetworkTopography().get(rackToClear));
        blacklistHostsAndSortNodes(blackListedHosts, supMap.values(), cluster, td1);
    }