@Test
public void testUpdateBundleFromUrl() throws Exception {

    Framework spiedMBean = Mockito.spy(mbean);
    InputStream stream = Mockito.mock(InputStream.class);
    Mockito.doReturn(stream).when(spiedMBean).createStream(Mockito.anyString());
    Bundle bundle = Mockito.mock(Bundle.class);
    Mockito.when(context.getBundle(5)).thenReturn(bundle);
    spiedMBean.updateBundleFromURL(5, "file:test.jar");
    Mockito.verify(bundle).update(stream);
}