@Test
    void verifyBCryptFail() {
        val encoder = new BCryptPasswordEncoder(8, RandomUtils.getNativeInstance());
        val sql = SQL.replace("*", '\'' + encoder.encode("pswbc1") + "' password");
        val properties = new QueryJdbcAuthenticationProperties().setSql(sql).setFieldPassword(PASSWORD_FIELD);
        val handler = new QueryDatabaseAuthenticationHandler(properties, null, PrincipalFactoryUtils.newPrincipalFactory(), dataSource);
        handler.setPasswordEncoder(encoder);
        assertThrows(FailedLoginException.class,
            () -> handler.authenticate(CoreAuthenticationTestUtils.getCredentialsWithDifferentUsernameAndPassword("user0", "pswbc1"), mock(Service.class)));
    }
This test proves that in case BCRYPT is used authentication using encoded password always fail
with FailedLoginException
support/cas-server-support-jdbc-authentication/src/test/java/org/apereo/cas/jdbc/QueryDatabaseAuthenticationHandlerTests.java