@Test
public void testAddPropertyString() throws IOException {

    User user1 = Mockito.mock(User.class);
    Dictionary<String, Object> props = new Hashtable<String, Object>();
    Mockito.when(userAdmin.getRole("user1")).thenReturn(user1);
    Mockito.when(user1.getType()).thenReturn(Role.USER);
    Mockito.when(user1.getProperties()).thenReturn(props);
    mbean.addPropertyString("key", "1234", "user1");
    Assert.assertEquals("1234", (String) props.get("key"));
}