SquirrelAction action = AppTestUtil.getEasyMockSquirrelAction(actionName);
expect(col.get(actionClass)).andReturn(action).anyTimes();
}
public static SquirrelAction getEasyMockSquirrelAction(String name) {
SquirrelAction result = createMock(SquirrelAction.class);
expect(result.getValue(Action.NAME)).andReturn(name).anyTimes();
expect(result.getValue(Action.SMALL_ICON)).andReturn(null).anyTimes();
expect(result.getValue(Action.MNEMONIC_KEY)).andReturn(null).anyTimes();
expect(result.getValue(Action.SHORT_DESCRIPTION)).andReturn(null)
.anyTimes();
expect(result.getValue(Action.ACTION_COMMAND_KEY)).andReturn(null)
.anyTimes();
expect(result.getValue(Action.ACCELERATOR_KEY)).andReturn(null)
.anyTimes();
expect(result.isEnabled()).andReturn(true).anyTimes();
expect(result.getKeyStroke()).andReturn(null).anyTimes();
expect(result.getValue(isA(String.class))).andStubReturn(null);
result.addPropertyChangeListener(isA(PropertyChangeListener.class));
expectLastCall().anyTimes();
replay(result);
return result;
}