@Test
    public void testHandleDisableDryRun() {
        Map<String, Object> namespace = new HashMap<>();
        namespace.put("feature", Arrays.asList("foo.bar", "metadata.version", "quux"));
        namespace.put("dry_run", true);
        String disableOutput = ToolsTestUtils.captureStandardOut(() -> {
            Throwable t = assertThrows(TerseException.class, () -> FeatureCommand.handleDisable(new Namespace(namespace), buildAdminClient()));
            assertTrue(t.getMessage().contains("1 out of 3 operation(s) failed."));
        });
        assertEquals(format("foo.bar can be disabled.%n" +
            "Can not disable metadata.version. Can't downgrade below 4%n" +
            "quux can be disabled."), disableOutput);
    }
Unit test of {@link FeatureCommand} tool.
tools/src/test/java/org/apache/kafka/tools/FeatureCommandTest.java