    @Test
    public void testAuthServiceRealmSet() {

        when(authenticationServiceRegistry.findAuthenticationService(any())).thenReturn(Optional.of(createAuthService(AuthenticationServiceType.standard, "myrealm")));
        AbstractFinalizerController.Result result = controller.processFinalizer(createTestSpace("standard", "myrealm"));
        assertNotNull(result);
        assertTrue(result.isFinalized());
    }