public static CountDownLatch pause(QuorumController controller) {
        final CountDownLatch latch = new CountDownLatch(1);
        controller.appendControlEvent("pause", () -> {
            try {
                latch.await();
            } catch (InterruptedException e) {
                log.info("Interrupted while waiting for unpause.", e);
            }
        });
        return latch;
    }
Add an event to the controller event queue that will pause it temporarily.

@param controller    The controller.
@return              The latch that can be used to unpause the controller.
metadata/src/test/java/org/apache/kafka/controller/QuorumControllerIntegrationTestUtils.java