public @NotNull Builder mainClass(final @NotNull Class<?> mainClass) {
            try {
                final Class<?> extensionMain = Class.forName(EXTENSION_MAIN_CLASS_NAME);
                if (!extensionMain.isAssignableFrom(mainClass)) {
                    throw new IllegalArgumentException(
                        "The provided class does not implement '" + EXTENSION_MAIN_CLASS_NAME + "'"
                    );
                }
                this.mainClass = mainClass;
                return this;
            } catch (final ClassNotFoundException e) {
                throw new IllegalStateException(
                    "The class '" + EXTENSION_MAIN_CLASS_NAME + "' was not found in the classpath."
                );
            }
        }
The main class of the {@link HiveMQExtension}.
This class MUST implement com.hivemq.extension.sdk.api.ExtensionMain.

@param mainClass the main class
@return the {@link Builder}
@throws IllegalArgumentException if the provides class does not implement com.hivemq.extension.sdk.api.ExtensionMain}
@throws IllegalStateException if com.hivemq.extension.sdk.api.ExtensionMain is not found in the classpath
modules/hivemq/src/main/java/org/testcontainers/hivemq/HiveMQExtension.java