public void testCreateUser() throws Exception {
    final int initialNumberOfUsers = _userManagement.viewUsers().size();
    assertFileDoesNotContainsPasswordForUser(_testUserName);

    boolean success = _userManagement.createUser(_testUserName, TEST_PASSWORD);
    assertTrue("Should have been able to create new user " + _testUserName, success);
    assertEquals(
        "Unexpected number of users after add",
        initialNumberOfUsers + 1,
        _userManagement.viewUsers().size());

    assertFileContainsPasswordForUser(_testUserName);
  }
  public void testSetPassword() throws Exception {
    testCreateUser();

    _userManagement.setPassword(_testUserName, TEST_NEWPASSWORD);

    assertFileContainsPasswordForUser(_testUserName);
  }
  public void testReload() throws Exception {
    writePasswordFile(
        _passwordFile,
        JMXTestUtils.DEFAULT_USERID,
        JMXTestUtils.DEFAULT_PASSWORD,
        _testUserName,
        TEST_PASSWORD);

    assertJmsConnectionFails(_testUserName, TEST_PASSWORD);

    _userManagement.reloadData();

    assertJmsConnectionSucceeds(_testUserName, TEST_PASSWORD);
  }
 public void testGetAuthenticationProviderType() throws Exception {
   String actualType = _userManagement.getAuthenticationProviderType();
   assertEquals(
       "unexpected authentication provider type", getAuthenticationManagerType(), actualType);
 }