@Test
public void test_canAddOrRemoveUser_failure_owner_deny() {

    UserDetails userDetails = getMockUser(false);
    SafeUser safeUser = new SafeUser("users/ert", "normaluser", "deny");
    Response response = getMockResponse(HttpStatus.OK, true, "{\"data\":{\"aws-roles\":" +
            "{\"erole\":\"read\",\"role1\":\"read\",\"role22\":\"read\",\"testrole3\":\"read\"}," +
            "\"description\":\"asd\",\"name\":\"ert\",\"owner\":\"sd@g.com\",\"ownerid\":\"normaluser\"," +
            "\"type\":\"\",\"users\":{\"normaluser\":\"sudo\",\"normaluser2\":\"read\"}}}");
    when(ControllerUtil.getSafeType("users/ert")).thenReturn("users");
    when(ControllerUtil.getSafeName("users/ert")).thenReturn("ert");
    when(ControllerUtil.getReqProcessor().process("/sdb", "{\"path\":\"metadata/users/ert\"}", "5PDrOhsy4ig8L3EpsJZSLAMg")).thenReturn(response);
    boolean canAdd = safeUtils.canAddOrRemoveUser(userDetails, safeUser, "addUser");
    assertFalse(canAdd);
}