@Test
    void verifyBadDecision() {
        val consentDecision = new ConsentDecision();
        consentDecision.setPrincipal("casuser");
        consentDecision.setService(RegisteredServiceTestUtils.getService().getId());
        assertThrows(IllegalArgumentException.class,
            () -> consentDecisionBuilder.getConsentableAttributesFrom(consentDecision));
        assertThrows(IllegalArgumentException.class,
            () -> consentDecisionBuilder.update(consentDecision, null));
    }
This is {@link DefaultConsentDecisionBuilderTests}.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-consent-core/src/test/java/org/apereo/cas/consent/DefaultConsentDecisionBuilderTests.java