@Test
    void verifyBCryptSuccess() throws Throwable {
        val encoder = new BCryptPasswordEncoder(6, RandomUtils.getNativeInstance());
        val sql = SQL.replace("*", '\'' + encoder.encode("pswbc2") + "' password");
        val properties = new QueryJdbcAuthenticationProperties().setSql(sql).setFieldPassword(PASSWORD_FIELD);
        val handler = new QueryDatabaseAuthenticationHandler(properties, null, PrincipalFactoryUtils.newPrincipalFactory(), dataSource);

        handler.setPasswordEncoder(encoder);
        assertNotNull(handler.authenticate(CoreAuthenticationTestUtils.getCredentialsWithDifferentUsernameAndPassword("user3", "pswbc2"), mock(Service.class)));
    }
This test proves that in case BCRYPT and
using raw password test can authenticate
support/cas-server-support-jdbc-authentication/src/test/java/org/apereo/cas/jdbc/QueryDatabaseAuthenticationHandlerTests.java