@Test
public void testGetExportingBundles() throws IOException {

    ExportedPackage exported = Mockito.mock(ExportedPackage.class);
    Bundle bundle = Mockito.mock(Bundle.class);
    Mockito.when(exported.getVersion()).thenReturn(Version.parseVersion("1.0.0"));
    Mockito.when(exported.getExportingBundle()).thenReturn(bundle);
    Mockito.when(bundle.getBundleId()).thenReturn(Long.valueOf(5));
    ExportedPackage exported2 = Mockito.mock(ExportedPackage.class);
    Bundle bundle2 = Mockito.mock(Bundle.class);
    Mockito.when(exported2.getVersion()).thenReturn(Version.parseVersion("1.0.0"));
    Mockito.when(exported2.getExportingBundle()).thenReturn(bundle2);
    Mockito.when(bundle2.getBundleId()).thenReturn(Long.valueOf(6));
    Mockito.when(admin.getExportedPackages(Mockito.anyString())).thenReturn(new ExportedPackage[]{exported, exported2});
    long[] ids = mbean.getExportingBundles("test", "1.0.0");
    Assert.assertNotNull(ids);
    Assert.assertArrayEquals(new long[]{5,6}, ids);
}