@Test
    void verifyOperation() {
        val policy = mock(Service.class);
        doCallRealMethod().when(policy).setPrincipal(anyString());
        assertDoesNotThrow(() -> policy.setPrincipal("casuser"));
    }
This is {@link ServiceTests}.

@author Misagh Moayyed
@since 6.3.0
api/cas-server-core-api-authentication/src/test/java/org/apereo/cas/authentication/principal/ServiceTests.java