@Override
    public void stop() {
        if (executor != null) {
            executor.shutdownNow();

            try {
                if (!executor.awaitTermination(20, TimeUnit.SECONDS))
                    throw new RuntimeException("Failed timely termination of scheduler");
            } catch (InterruptedException e) {
                throw new RuntimeException("Task was interrupted during shutdown");
            }
        }
    }
This connector provides support for mocking certain connector behaviors. For example,
this can be used to simulate connector or task failures. It works by passing a "mock mode"
through configuration from the system test. New mock behavior can be implemented either
in the connector or in the task by providing a new mode implementation.
<p>
At the moment, this connector only supports a single task and shares configuration between
the connector and its tasks.

@see MockSinkConnector
@see MockSourceConnector
connect/test-plugins/src/main/java/org/apache/kafka/connect/tools/MockConnector.java