@Test
    public void testListClientMetricsResourcesEmpty() throws Exception {
        try (AdminClientUnitTestEnv env = mockClientEnv()) {
            List<ClientMetricsResourceListing> expected = Collections.emptyList();

            ListClientMetricsResourcesResponseData responseData =
                new ListClientMetricsResourcesResponseData().setErrorCode(Errors.NONE.code());

            env.kafkaClient().prepareResponse(
                request -> request instanceof ListClientMetricsResourcesRequest,
                new ListClientMetricsResourcesResponse(responseData));

            ListClientMetricsResourcesResult result = env.adminClient().listClientMetricsResources();
            assertEquals(new HashSet<>(expected), new HashSet<>(result.all().get()));
        }
    }
Test that if the client can send to a node, but doesn't receive a response, it will
disconnect and try a different node.
clients/src/test/java/org/apache/kafka/clients/admin/KafkaAdminClientTest.java