@Override
    public Map<String, String> connectorConfig(String connName) {
        FutureCallback<Map<String, String>> connectorConfigCallback = new FutureCallback<>();
        herder.connectorConfig(connName, connectorConfigCallback);
        try {
            return new HashMap<>(connectorConfigCallback.get(herderRequestTimeoutMs, TimeUnit.MILLISECONDS));
        } catch (InterruptedException | ExecutionException | TimeoutException e) {
            throw new ConnectException(
                String.format("Failed to retrieve configuration for connector '%s'", connName),
                e
            );
        }
    }
@Test
    public void connectorConfig() {
        final String connName = "sink6";
        final Map<String, String> expectedConfig = Collections.singletonMap("key", "value");

        @SuppressWarnings("unchecked")
        ArgumentCaptor<Callback<Map<String, String>>> callback = ArgumentCaptor.forClass(Callback.class);
        doAnswer(invocation -> {
            callback.getValue().onCompletion(null, expectedConfig);
            return null;
        }).when(herder).connectorConfig(eq(connName), callback.capture());

        Map<String, String> actualConfig = connectClusterState.connectorConfig(connName);

        assertEquals(expectedConfig, actualConfig);
        assertNotSame(expectedConfig,
            actualConfig,
            "Config should be copied in order to avoid mutation by REST extensions");
    }