@Bean
        public CasGoogleAuthenticator googleAuthenticatorInstance() {
            val auth = mock(CasGoogleAuthenticator.class);
            when(auth.authorize(anyString(), ArgumentMatchers.eq(123456))).thenReturn(Boolean.TRUE);
            when(auth.authorize(anyString(), ArgumentMatchers.eq(987654))).thenReturn(Boolean.FALSE);
            when(auth.authorize(anyString(), ArgumentMatchers.eq(112233))).thenThrow(new IllegalArgumentException());
            return auth;
        }
This is {@link GoogleAuthenticatorSaveRegistrationActionTests}.

@author Misagh Moayyed
@since 6.3.0
support/cas-server-support-gauth/src/test/java/org/apereo/cas/gauth/web/flow/GoogleAuthenticatorSaveRegistrationActionTests.java