@Test
public void testSetUserActive() throws Exception {

  users.createUser("user", "user");
  users.setUserActive("user", false);
  Assert.assertEquals(false, users.getAnyUser("user").isActive());
  users.setUserActive("user", true);
  Assert.assertEquals(true, users.getAnyUser("user").isActive());
  try {
    users.setUserActive("fake user", true);
    Assert.fail("It shouldn't be possible to call setUserActive() on non-existing user");
  } catch (Exception ex) {
  }
}