RuntimeComponent component = EasyMock.createNiceMock(RuntimeComponent.class);
EasyMock.expect(component.getName()).andReturn("LocalNotificationComponentTest");
EasyMock.expect(component.getReferences()).andReturn(references);
EasyMock.replay(component);
Invoker localNotificationInvoker = new NotificationComponentInvoker(operation, component);
Message msg = EasyMock.createNiceMock(Message.class);
EasyMock.expect(msg.getBody()).andReturn("msg").times(3); // once per sub int + once in notif target invoker
EasyMock.replay(msg);
localNotificationInvoker.invoke(msg);
EasyMock.verify(msg);
} catch(Throwable e) {
e.printStackTrace();
}
}