}
}
// First, do a run with no bootstrap components
ExtendedComponentProvider mockProvider = Mockito.mock(ExtendedComponentProvider.class);
Mockito.when(mockProvider.getBootstrapComponents()).thenReturn(Collections.<AbstractComponent>emptyList());
registry.refreshComponents(Arrays.asList(mockProvider));
// Verify that this method was probed
Mockito.verify(mockProvider).getBootstrapComponents();
// Verify that persistence was not invoked
Mockito.verifyNoMoreInteractions(mockPersistence);
// Now, do a run with two bootstraps components (one global, one local)
AbstractComponent global = new BootstrapComponent(true);
AbstractComponent local = new BootstrapComponent(false);
Mockito.when(mockProvider.getBootstrapComponents()).thenReturn(Arrays.asList(global, local));
registry.refreshComponents(Arrays.asList(mockProvider));
// Verify that persistence was invoked, including appropriate tagging
@SuppressWarnings("rawtypes")