public static boolean shouldLoadInIsolation(String name) {
        return !(EXCLUDE.matcher(name).matches() && !INCLUDE.matcher(name).matches());
    }
@Test
    public void testConnectApiClasses() {
        List<String> apiClasses = Arrays.asList(
            // Enumerate all packages and classes
            "org.apache.kafka.connect.",
            "org.apache.kafka.connect.components.",
            "org.apache.kafka.connect.components.Versioned",
            //"org.apache.kafka.connect.connector.policy.", isolated by default
            "org.apache.kafka.connect.connector.policy.ConnectorClientConfigOverridePolicy",
            "org.apache.kafka.connect.connector.policy.ConnectorClientConfigRequest",
            "org.apache.kafka.connect.connector.policy.ConnectorClientConfigRequest$ClientType",
            "org.apache.kafka.connect.connector.",
            "org.apache.kafka.connect.connector.Connector",
            "org.apache.kafka.connect.connector.ConnectorContext",
            "org.apache.kafka.connect.connector.ConnectRecord",
            "org.apache.kafka.connect.connector.Task",
            "org.apache.kafka.connect.data.",
            "org.apache.kafka.connect.data.ConnectSchema",
            "org.apache.kafka.connect.data.Date",
            "org.apache.kafka.connect.data.Decimal",
            "org.apache.kafka.connect.data.Field",
            "org.apache.kafka.connect.data.Schema",
            "org.apache.kafka.connect.data.SchemaAndValue",
            "org.apache.kafka.connect.data.SchemaBuilder",
            "org.apache.kafka.connect.data.SchemaProjector",
            "org.apache.kafka.connect.data.Struct",
            "org.apache.kafka.connect.data.Time",
            "org.apache.kafka.connect.data.Timestamp",
            "org.apache.kafka.connect.data.Values",
            "org.apache.kafka.connect.errors.",
            "org.apache.kafka.connect.errors.AlreadyExistsException",
            "org.apache.kafka.connect.errors.ConnectException",
            "org.apache.kafka.connect.errors.DataException",
            "org.apache.kafka.connect.errors.IllegalWorkerStateException",
            "org.apache.kafka.connect.errors.NotFoundException",
            "org.apache.kafka.connect.errors.RetriableException",
            "org.apache.kafka.connect.errors.SchemaBuilderException",
            "org.apache.kafka.connect.errors.SchemaProjectorException",
            "org.apache.kafka.connect.header.",
            "org.apache.kafka.connect.header.ConnectHeader",
            "org.apache.kafka.connect.header.ConnectHeaders",
            "org.apache.kafka.connect.header.Header",
            "org.apache.kafka.connect.header.Headers",
            "org.apache.kafka.connect.health.",
            "org.apache.kafka.connect.health.AbstractState",
            "org.apache.kafka.connect.health.ConnectClusterDetails",
            "org.apache.kafka.connect.health.ConnectClusterState",
            "org.apache.kafka.connect.health.ConnectorHealth",
            "org.apache.kafka.connect.health.ConnectorState",
            "org.apache.kafka.connect.health.ConnectorType",
            "org.apache.kafka.connect.health.TaskState",
            "org.apache.kafka.connect.rest.",
            "org.apache.kafka.connect.rest.ConnectRestExtension",
            "org.apache.kafka.connect.rest.ConnectRestExtensionContext",
            "org.apache.kafka.connect.sink.",
            "org.apache.kafka.connect.sink.SinkConnector",
            "org.apache.kafka.connect.sink.SinkRecord",
            "org.apache.kafka.connect.sink.SinkTask",
            "org.apache.kafka.connect.sink.SinkTaskContext",
            "org.apache.kafka.connect.sink.ErrantRecordReporter",
            "org.apache.kafka.connect.source.",
            "org.apache.kafka.connect.source.SourceConnector",
            "org.apache.kafka.connect.source.SourceRecord",
            "org.apache.kafka.connect.source.SourceTask",
            "org.apache.kafka.connect.source.SourceTaskContext",
            "org.apache.kafka.connect.storage.",
            "org.apache.kafka.connect.storage.Converter",
            "org.apache.kafka.connect.storage.ConverterConfig",
            "org.apache.kafka.connect.storage.ConverterType",
            "org.apache.kafka.connect.storage.HeaderConverter",
            "org.apache.kafka.connect.storage.OffsetStorageReader",
            //"org.apache.kafka.connect.storage.SimpleHeaderConverter", explicitly isolated
            //"org.apache.kafka.connect.storage.StringConverter", explicitly isolated
            "org.apache.kafka.connect.storage.StringConverterConfig",
            //"org.apache.kafka.connect.transforms.", isolated by default
            "org.apache.kafka.connect.transforms.Transformation",
            "org.apache.kafka.connect.transforms.predicates.Predicate",
            "org.apache.kafka.connect.util.",
            "org.apache.kafka.connect.util.ConnectorUtils"
        );
        // Classes in the API should never be loaded in isolation.
        for (String clazz : apiClasses) {
            assertFalse(PluginUtils.shouldLoadInIsolation(clazz),
                clazz + " from 'api' is loaded in isolation but should not be");
        }
    }