@Test
public void testGetProperties() throws IOException {

    User user1 = Mockito.mock(User.class);
    Dictionary<String, Object> properties = new Hashtable<String, Object>();
    properties.put("key", "value");
    Mockito.when(user1.getProperties()).thenReturn(properties);
    Mockito.when(userAdmin.getRole(Mockito.anyString())).thenReturn(user1);
    TabularData data = mbean.getProperties("user1");
    Assert.assertNotNull(data);
    Assert.assertEquals(JmxConstants.PROPERTIES_TYPE, data.getTabularType());
    CompositeData composite = data.get(new Object[] { "key" });
    Assert.assertNotNull(composite);
    Assert.assertEquals("key", (String) composite.get(JmxConstants.KEY));
    Assert.assertEquals("value", (String) composite.get(JmxConstants.VALUE));
}