@Override
    public void close() throws Exception {
        log.info("Closing MiniTrogdorCluster.");
        if (coordinator != null) {
            coordinator.beginShutdown(false);
        }
        for (Agent agent : agents.values()) {
            agent.beginShutdown();
        }
        for (Agent agent : agents.values()) {
            agent.waitForShutdown();
        }
        if (coordinator != null) {
            coordinator.waitForShutdown();
        }
    }
Mimic a restart of a Trogdor agent, essentially cleaning out all of its active workers
trogdor/src/test/java/org/apache/kafka/trogdor/common/MiniTrogdorCluster.java