@Test
public void testGetGroup() throws IOException {

    Group group1 = Mockito.mock(Group.class);
    Mockito.when(group1.getType()).thenReturn(Role.GROUP);
    Mockito.when(group1.getName()).thenReturn("group1");
    Role role1 = Mockito.mock(Role.class);
    Mockito.when(role1.getName()).thenReturn("role1");
    Role role2 = Mockito.mock(Role.class);
    Mockito.when(role2.getName()).thenReturn("role2");
    Mockito.when(group1.getRequiredMembers()).thenReturn(new Role[] { role1 });
    Mockito.when(group1.getMembers()).thenReturn(new Role[] { role2 });
    Mockito.when(userAdmin.getRole(Mockito.anyString())).thenReturn(group1);
    CompositeData data = mbean.getGroup("group1");
    Assert.assertNotNull(data);
    GroupData group = GroupData.from(data);
    Assert.assertNotNull(group);
    Assert.assertEquals("group1", group.getName());
    Assert.assertEquals(Role.GROUP, group.getType());
    Assert.assertArrayEquals(new String[] { "role2" }, group.getMembers());
    Assert.assertArrayEquals(new String[] { "role1" }, group.getRequiredMembers());
    Mockito.verify(userAdmin).getRole(Mockito.anyString());
}