class MongoDbProjectGenerationConfiguration {

	private static final String TESTCONTAINERS_CLASS_NAME = "org.testcontainers.containers.MongoDBContainer";

	@Bean
	@ConditionalOnRequestedDependency("testcontainers")
	ServiceConnectionsCustomizer mongoDbServiceConnectionsCustomizer(Build build,
			DockerServiceResolver serviceResolver) {<FILL_FUNCTION_BODY>}

	@Bean
	@ConditionalOnRequestedDependency("docker-compose")
	ComposeFileCustomizer mongoDbComposeFileCustomizer(Build build, DockerServiceResolver serviceResolver) {
		return (composeFile) -> {
			if (isMongoEnabled(build)) {
				serviceResolver.doWith("mongoDb", (service) -> composeFile.services()
					.add("mongodb",
							service.andThen((builder) -> builder.environment("MONGO_INITDB_ROOT_USERNAME", "root")
								.environment("MONGO_INITDB_ROOT_PASSWORD", "secret")
								.environment("MONGO_INITDB_DATABASE", "mydatabase"))));
			}
		};
	}

	private boolean isMongoEnabled(Build build) {
		return build.dependencies().has("data-mongodb") || build.dependencies().has("data-mongodb-reactive");
	}

}

		return (serviceConnections) -> {
			if (isMongoEnabled(build)) {
				serviceResolver.doWith("mongoDb", (service) -> serviceConnections.addServiceConnection(
						ServiceConnection.ofContainer("mongoDb", service, TESTCONTAINERS_CLASS_NAME, false)));
			}
		};
	
<no_super_class>