@Test
public void test_canAddOrRemoveUser_failure_empty_safetype() {

    UserDetails userDetails = getMockUser(false);
    SafeUser safeUser = new SafeUser("ert", "normaluser", "write");
    when(ControllerUtil.getSafeType("ert")).thenReturn("");
    when(ControllerUtil.getSafeName("users/ert")).thenReturn("ert");
    boolean canAdd = safeUtils.canAddOrRemoveUser(userDetails, safeUser, "addUser");
    assertFalse(canAdd);
}