@Test
        void verifyAuthenticationWithBadSecret() throws Throwable {
            val refreshToken = getRefreshToken(service);
            ticketRegistry.addTicket(refreshToken);

            val credentials = new UsernamePasswordCredentials(service.getClientId(), UUID.randomUUID().toString());
            val request = new MockHttpServletRequest();
            val ctx = new JEEContext(request, new MockHttpServletResponse());
            request.addParameter(OAuth20Constants.GRANT_TYPE, OAuth20GrantTypes.REFRESH_TOKEN.name());
            request.addParameter(OAuth20Constants.REFRESH_TOKEN, refreshToken.getId());

            assertThrows(CredentialsException.class,
                () -> oauthClientAuthenticator.validate(new CallContext(ctx, new JEESessionStore()), credentials));
        }
This is {@link OAuth20ClientIdClientSecretAuthenticatorTests}.

@author Misagh Moayyed
@since 6.0.0
support/cas-server-support-oauth/src/test/java/org/apereo/cas/support/oauth/authenticator/OAuth20ClientIdClientSecretAuthenticatorTests.java