public ConnectorInfo connectorInfo(String connectorName) {
        ObjectMapper mapper = new ObjectMapper();
        String url = endpointForResource(String.format("connectors/%s", connectorName));
        Response response = requestGet(url);
        try {
            if (response.getStatus() < Response.Status.BAD_REQUEST.getStatusCode()) {
                return mapper.readValue(responseToString(response), ConnectorInfo.class);
            }
        } catch (IOException e) {
            log.error("Could not read connector info from response: {}",
                    responseToString(response), e);
            throw new ConnectException("Could not not parse connector info", e);
        }
        throw new ConnectRestException(response.getStatus(),
                "Could not read connector info. Error response: " + responseToString(response));
    }
Get the info of a connector running in this cluster (retrieved via the <code>GET /connectors/{connector}</code> endpoint).
@param connectorName name of the connector
@return an instance of {@link ConnectorInfo} populated with state information of the connector and its tasks.
connect/runtime/src/test/java/org/apache/kafka/connect/util/clusters/EmbeddedConnect.java