@Test
public void testIsRemovalPending() throws IOException {

    ExportedPackage exported = Mockito.mock(ExportedPackage.class);
    Bundle expBundle = Mockito.mock(Bundle.class);
    Mockito.when(exported.getVersion()).thenReturn(Version.parseVersion("1.0.0"));
    Mockito.when(exported.isRemovalPending()).thenReturn(true);
    Mockito.when(exported.getExportingBundle()).thenReturn(expBundle);
    Mockito.when(expBundle.getBundleId()).thenReturn(Long.valueOf(2));
    Mockito.when(admin.getExportedPackages(Mockito.anyString())).thenReturn(new ExportedPackage[]{exported});
    boolean isRemoval = mbean.isRemovalPending("test", "1.0.0", Long.valueOf(2));
    Assert.assertTrue(isRemoval);
}