@Test
public void ShouldAddNewItemDuringLoad() throws Exception {

    BootstrapItem bootstrapItem = Mockito.mock(BootstrapItem.class);
    PowerMockito.whenNew(BootstrapItem.class).withAnyArguments().thenReturn(bootstrapItem);
    when(bootstrapItem.after(anyString())).thenReturn(bootstrapItem);
    when(bootstrapItem.before(anyString())).thenReturn(bootstrapItem);
    CheckValidityAsyncOperationActor actor = Mockito.mock(CheckValidityAsyncOperationActor.class);
    PowerMockito.whenNew(CheckValidityAsyncOperationActor.class).withAnyArguments().thenReturn(actor);
    plugin.load();
    PowerMockito.verifyNew(BootstrapItem.class).withArguments("CreateCheckValidityAsyncOperationActor");
    ArgumentCaptor<IPoorAction> actionArgumentCaptor = ArgumentCaptor.forClass(IPoorAction.class);
    verify(bootstrapItem).process(actionArgumentCaptor.capture());
    ArgumentCaptor<ApplyFunctionToArgumentsStrategy> createNewInstanceStrategyArgumentCaptor =
            ArgumentCaptor.forClass(ApplyFunctionToArgumentsStrategy.class);
    actionArgumentCaptor.getValue().execute();
    PowerMockito.verifyStatic();
    IOC.register(Mockito.eq(operationKey), createNewInstanceStrategyArgumentCaptor.capture());
    verify(bootstrap).add(Mockito.any());
}