public void restartAgent(String nodeName) {
        if (!agents.containsKey(nodeName)) {
            throw new RuntimeException("There is no agent on node " + nodeName);
        }
        Builder.NodeData node = nodesByAgent.get(nodeName);
        agents.put(nodeName, new Agent(node.platform, scheduler, node.agentRestServer, node.agentRestResource));
    }
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