@Test
public void ShouldCorrectLoadPlugin() throws Exception {

    BootstrapItem item = mock(BootstrapItem.class);
    whenNew(BootstrapItem.class).withArguments("IFieldPlugin").thenReturn(item);
    when(item.after("IOC")).thenReturn(item);
    when(item.after("IFieldNamePlugin")).thenReturn(item);
    plugin.load();
    verifyNew(BootstrapItem.class).withArguments("IFieldPlugin");
    verify(item).after("IOC");
    ArgumentCaptor<IPoorAction> iPoorActionArgumentCaptor = ArgumentCaptor.forClass(IPoorAction.class);
    verify(item).process(iPoorActionArgumentCaptor.capture());
    verify(bootstrap).add(item);
    IKey iFieldKey = mock(IKey.class);
    when(Keys.getOrAdd(IField.class.getCanonicalName())).thenReturn(iFieldKey);
    IKey iFieldNameKey = mock(IKey.class);
    when(Keys.getOrAdd("info.smart_tools.smartactors.iobject.ifield_name.IFieldName")).thenReturn(iFieldNameKey);
    IFieldName fieldName = mock(IFieldName.class);
    when(IOC.resolve(eq(iFieldNameKey), anyString())).thenReturn(fieldName);
    ArgumentCaptor<ResolveByNameIocStrategy> resolveByNameIocStrategyArgumentCaptor =
        ArgumentCaptor.forClass(ResolveByNameIocStrategy.class);
    iPoorActionArgumentCaptor.getValue().execute();
    verifyStatic();
    Keys.getOrAdd(IField.class.getCanonicalName());
    verifyStatic();
    IOC.register(eq(iFieldKey), resolveByNameIocStrategyArgumentCaptor.capture());
    String fieldNameStr = "exampleField";
    Field field = mock(Field.class);
    whenNew(Field.class).withArguments(fieldName).thenReturn(field);
    assertTrue("Must return correct value",
        resolveByNameIocStrategyArgumentCaptor.getValue().resolve(fieldNameStr) == field);
    verifyNew(Field.class).withArguments(fieldName);
}