@Test
    void verifyBeanProxied() throws Throwable {
        val r1 = BeanSupplier.of(CipherExecutor.class).neverMatch().otherwiseProxy().get();
        assertTrue(BeanSupplier.isProxy(r1));

        val r2 = BeanSupplier.of(DistributedCacheManager.class).neverMatch().otherwiseProxy().get();
        assertTrue(BeanSupplier.isProxy(r2));
        assertDoesNotThrow(r2::clear);
        assertDoesNotThrow(r2::close);

        assertFalse(r2.contains(null));
        assertTrue(r2.find(o -> true).isEmpty());
        assertNotNull(r2.findAll(o -> true));
        assertNull(r2.getName());

        val r3 = BeanSupplier.of(CasRuntimeModuleLoader.class).otherwiseProxy().get();
        assertTrue(BeanSupplier.isProxy(r3));
        assertTrue(r3.load().isEmpty());

        val r4 = BeanSupplier.of(RandomStringGenerator.class).otherwiseProxy().get();
        assertTrue(BeanSupplier.isProxy(r4));
        assertNull(r4.getAlgorithm());
        assertNotNull(r4.getNewStringAsBytes(0));
        assertNull(r4.getNewString(0));

    }
This is {@link BeanSupplierTests}.

@author Misagh Moayyed
@since 6.5.0
core/cas-server-core-util-api/src/test/java/org/apereo/cas/util/spring/beans/BeanSupplierTests.java