@Test
    void verifyPackages() {
        val props = new SingleCollectionMongoDbProperties();
        props.setHost("localhost,localhost");
        props.setPort(27017);
        props.setUserId("root");
        props.setPassword("password");
        props.setDatabaseName("audit");
        props.setAuthenticationDatabaseName("admin");
        val factory = new MongoDbConnectionFactory(new StringToWriteConcernConverter()) {
            @Override
            protected Collection<String> getMappingBasePackages() {
                return List.of(SampleDocument.class.getPackageName());
            }
        };
        val template = factory.buildMongoTemplate(props);
        assertNotNull(template);
    }
This is {@link MongoDbConnectionFactoryTests}.

@author Misagh Moayyed
@since 6.2.0
support/cas-server-support-mongo/src/test/java/org/apereo/cas/authentication/MongoDbConnectionFactoryTests.java