@Test
public void MustInCorrectExecuteActionWhenIOCRegisterThrowException() throws Exception {

    BootstrapItem bootstrapItem = mock(BootstrapItem.class);
    whenNew(BootstrapItem.class).withArguments("GetHeaderFromRequestRulePlugin").thenReturn(bootstrapItem);
    when(bootstrapItem.after(anyString())).thenReturn(bootstrapItem);
    when(bootstrapItem.before(anyString())).thenReturn(bootstrapItem);
    plugin.load();
    verifyNew(BootstrapItem.class).withArguments("GetHeaderFromRequestRulePlugin");
    ArgumentCaptor<IPoorAction> actionArgumentCaptor = ArgumentCaptor.forClass(IPoorAction.class);
      verify(bootstrapItem).after("IOC");
    verify(bootstrapItem).process(actionArgumentCaptor.capture());
    verify(bootstrap).add(bootstrapItem);
    IKey strategyKey = mock(IKey.class);
    when(Keys.getOrAdd(IResolveDependencyStrategy.class.getCanonicalName())).thenReturn(strategyKey);
    GetHeaderFromRequestRule targetObject = mock(GetHeaderFromRequestRule.class);
    whenNew(GetHeaderFromRequestRule.class).withNoArguments().thenReturn(targetObject);
    when(IOC.resolve(strategyKey, "getHeaderFromRequestRule", targetObject)).thenThrow(new ResolutionException(""));
    try {
        actionArgumentCaptor.getValue().execute();
    } catch (ActionExecuteException e) {
        verifyStatic();
        Keys.getOrAdd(IResolveDependencyStrategy.class.getCanonicalName());
        verifyNew(GetHeaderFromRequestRule.class).withNoArguments();
        verifyStatic();
        IOC.resolve(strategyKey, "getHeaderFromRequestRule", targetObject);
        return;
    }
    assertTrue("Must throw exception", false);
}