@Override
    public Result reconcile(Request request) {
        client.fetch(User.class, request.name()).ifPresent(user -> {
            if (isDeleted(user)) {
                deleteUserConnections(request.name());
                removeFinalizers(user.getMetadata(), Set.of(FINALIZER_NAME));
                client.update(user);
                return;
            }
            addFinalizers(user.getMetadata(), Set.of(FINALIZER_NAME));
            ensureRoleNamesAnno(user);
            updatePermalink(user);
            handleAvatar(user);
            checkVerifiedEmail(user);
            client.update(user);
        });
        return new Result(false, null);
    }
@Test
    void permalinkForFakeUser() throws URISyntaxException {
        when(externalUrlSupplier.get()).thenReturn(new URI("http://localhost:8090"));

        when(roleService.getRolesByUsername("fake-user"))
            .thenReturn(Flux.empty());

        when(client.fetch(eq(User.class), eq("fake-user")))
            .thenReturn(Optional.of(user("fake-user")));
        userReconciler.reconcile(new Reconciler.Request("fake-user"));

        verify(client).<User>update(assertArg(user ->
            assertEquals(
                "http://localhost:8090/authors/fake-user",
                user.getStatus().getPermalink()
            )
        ));
    }