@Test
public void testRefreshBundles() throws IOException {

    Bundle bundle = Mockito.mock(Bundle.class);
    Mockito.when(context.getBundle(1)).thenReturn(bundle);
    mbean.refreshBundles(new long[] { 1 });
    Mockito.verify(admin).refreshPackages((Bundle[]) Mockito.any());
    mbean.refreshBundles(null);
    Mockito.verify(admin).refreshPackages(null);
}