public void testSetBundleStartLevels() throws IOException {
Bundle bundle = Mockito.mock(Bundle.class);
Mockito.when(context.getBundle(2)).thenReturn(bundle);
CompositeData data = mbean.setBundleStartLevels(new long[] { 2 }, new int[] { 2 });
Mockito.verify(startLevel).setBundleStartLevel(bundle, 2);
BatchActionResult batch = BatchActionResult.from(data);
Assert.assertEquals(2, batch.getCompleted()[0]);
Assert.assertTrue(batch.isSuccess());
Assert.assertNull(batch.getError());
Assert.assertNull(batch.getRemainingItems());
CompositeData data2 = mbean.setBundleStartLevels(new long[] { 2 }, new int[] { 2, 4 });
BatchActionResult batch2 = BatchActionResult.from(data2);
Assert.assertNull(batch2.getCompleted());
Assert.assertFalse(batch2.isSuccess());
Assert.assertNotNull(batch2.getError());
Assert.assertNull(batch2.getRemainingItems());
}