private static BeanDefinitionStoreException createFailure() {
        val bf = new DefaultListableBeanFactory();
        bf.registerBeanDefinition("testBean",
            genericBeanDefinition(CasServerProperties.class)
                .addPropertyValue("name", "${not.defined}")
                .getBeanDefinition());

        val ppc = new PropertySourcesPlaceholderConfigurer();
        try {
            ppc.postProcessBeanFactory(bf);
        } catch (final BeanDefinitionStoreException e) {
            return e;
        }
        return null;
    }
This is {@link BeanDefinitionStoreFailureAnalyzerTests}.

@author Hal Deadman
@since 6.4.0
core/cas-server-core-util-api/src/test/java/org/apereo/cas/util/spring/boot/BeanDefinitionStoreFailureAnalyzerTests.java