@Test
public void testSetGroupLdap() throws Exception {

  users.createGroup("group", GroupType.LOCAL);
  users.setGroupLdap("group");
  Assert.assertNotNull(users.getGroup("group"));
  Assert.assertTrue(users.getGroup("group").isLdapGroup());
  try {
    users.setGroupLdap("fake group");
    Assert.fail("It shouldn't be possible to call setGroupLdap() on non-existing group");
  } catch (AmbariException ex) {
  }
}