@Test
public void ShouldCorrectLoadPlugin() throws Exception {

    IKey actorKey = mock(IKey.class);
    when(Keys.getOrAdd(eq(GetAsyncOperationActor.class.getCanonicalName()))).thenReturn(actorKey);
    BootstrapItem bootstrapItem = mock(BootstrapItem.class);
    whenNew(BootstrapItem.class).withArguments("CreateGetAsyncOperationActor").thenReturn(bootstrapItem);
    when(bootstrapItem.after(anyString())).thenReturn(bootstrapItem);
    when(bootstrapItem.before(anyString())).thenReturn(bootstrapItem);
    plugin.load();
    verifyNew(BootstrapItem.class).withArguments("CreateGetAsyncOperationActor");
    ArgumentCaptor<IPoorAction> actionArgumentCaptor = ArgumentCaptor.forClass(IPoorAction.class);
    verify(bootstrapItem).process(actionArgumentCaptor.capture());
    ArgumentCaptor<ApplyFunctionToArgumentsStrategy> createNewInstanceStrategyArgumentCaptor =
            ArgumentCaptor.forClass(ApplyFunctionToArgumentsStrategy.class);
    actionArgumentCaptor.getValue().execute();
    verifyStatic();
    IOC.register(eq(actorKey), createNewInstanceStrategyArgumentCaptor.capture());
    GetAsyncOperationActor actor = mock(GetAsyncOperationActor.class);
    whenNew(GetAsyncOperationActor.class).withAnyArguments().thenReturn(actor);
    verify(bootstrap).add(bootstrapItem);
}