public SessionFactory build(HibernateBundle<?> bundle,
                                Environment environment,
                                PooledDataSourceFactory dbConfig,
                                List<Class<?>> entities) {
        return build(bundle, environment, dbConfig, entities, DEFAULT_NAME);
    }
@Test
    void setsPoolName() {
        build();

        ArgumentCaptor<SessionFactoryManager> sessionFactoryManager = ArgumentCaptor.forClass(SessionFactoryManager.class);
        verify(lifecycleEnvironment).manage(sessionFactoryManager.capture());
        assertThat(sessionFactoryManager.getValue().getDataSource())
            .isInstanceOfSatisfying(ManagedPooledDataSource.class, dataSource ->
                assertThat(dataSource.getPool().getName()).isEqualTo("hibernate"));
    }