@BeforeEach
    public void setup(TestInfo testInfo) {
        log.info("Starting test {}", testInfo.getDisplayName());
        connectorName = CONNECTOR_NAME_PREFIX + testInfo.getTestMethod().get().getName();
        // get connector handles before starting test.
        connectorHandle = RuntimeHandles.get().connectorHandle(connectorName);
    }
Test connectors restart API use cases.
connect/runtime/src/test/java/org/apache/kafka/connect/integration/ConnectorRestartApiIntegrationTest.java