private List<Set<String>> partitionSets() {
        List<Set<String>> partitionSets = new ArrayList<>();
        HashSet<String> prevNodes = new HashSet<>();
        for (List<String> partition : this.partitions()) {
            for (String nodeName : partition) {
                if (prevNodes.contains(nodeName)) {
                    throw new RuntimeException("Node " + nodeName +
                        " appears in more than one partition.");
                }
                prevNodes.add(nodeName);
                partitionSets.add(new HashSet<>(partition));
            }
        }
        return partitionSets;
    }
The specification for a fault that creates a network partition.
trogdor/src/main/java/org/apache/kafka/trogdor/fault/NetworkPartitionFaultSpec.java