@Test
    void verifyOperation() {
        val factories = SpringFactoriesLoader.loadFactories(SpringApplicationRunListener.class, getClass().getClassLoader());
        assertFalse(factories.isEmpty());
        val listener = factories.stream()
            .filter(CasNativeApplicationRunListener.class::isInstance)
            .findFirst()
            .orElseThrow();
        val environment = new MockEnvironment();
        environment.setActiveProfiles(CasConfigurationPropertiesSourceLocator.PROFILE_NATIVE);
        listener.environmentPrepared(mock(ConfigurableBootstrapContext.class), environment);
        assertTrue(environment.getPropertySources().contains("casNativeCompositeSource"));
    }
This is {@link CasNativeApplicationRunListenerTests}.

@author Misagh Moayyed
@since 7.0.0
support/cas-server-support-native/src/test/java/org/apereo/cas/nativex/CasNativeApplicationRunListenerTests.java