@Test
public void testStartBundles() throws Exception {

    Bundle bundle = Mockito.mock(Bundle.class);
    Mockito.when(context.getBundle(5)).thenReturn(bundle);
    CompositeData data = mbean.startBundles(new long[] { 5 });
    Mockito.verify(bundle).start();
    BatchActionResult batch = BatchActionResult.from(data);
    Assert.assertEquals(5, batch.getCompleted()[0]);
    Assert.assertTrue(batch.isSuccess());
    Assert.assertNull(batch.getError());
    Assert.assertNull(batch.getRemainingItems());
    CompositeData data2 = mbean.startBundles(null);
    BatchActionResult batch2 = BatchActionResult.from(data2);
    Assert.assertNull(batch2.getCompleted());
    Assert.assertFalse(batch2.isSuccess());
    Assert.assertNotNull(batch2.getError());
    Assert.assertNull(batch2.getRemainingItems());
}