@Test
public void testIsBundlePendingRemoval() throws Exception {

    
    Bundle bundle = mock(Bundle.class);
    when(bundle.getSymbolicName()).thenReturn("org.apache.testb");
    
    RequiredBundle reqBundle = mock(RequiredBundle.class);
    when(reqBundle.getBundle()).thenReturn(bundle);
    when(reqBundle.isRemovalPending()).thenReturn(true);
    
    PackageAdmin admin = mock(PackageAdmin.class);
    when(admin.getRequiredBundles("org.apache.testb")).thenReturn(new RequiredBundle[] { reqBundle });
    
    assertTrue(isBundlePendingRemoval(bundle, admin));
    
}