@Override
  public void deactivate(String id, Boolean anonymize) {
    userSession.checkLoggedIn().checkIsSystemAdministrator();
    checkRequest(!id.equals(userSession.getUuid()), "Self-deactivation is not possible");
    userService.deactivate(id, anonymize);
  }
@Test
  public void deactivate_whenUserServiceThrowsNotFoundException_shouldReturnNotFound() throws Exception {
    userSession.logIn().setSystemAdministrator();
    doThrow(new NotFoundException("User not found.")).when(userService).deactivate("userToDelete", false);

    mockMvc.perform(delete(USER_ENDPOINT + "/userToDelete"))
      .andExpectAll(
        status().isNotFound(),
        content().json("{\"message\":\"User not found.\"}"));
  }