ClusterEventObserver { void consumeMessage(Event<Object> eventBus, ClusterSerializedCDIMessageWrapper message) { if (!message.getNodeId().equals(nodeId)) { try { Object event = fromJSON(message); eventBus.fire(event); } catch (Exception e) { LOGGER.error("Error consuming cluster event: " + e.getMessage()); } } } ClusterEventObserver(); @Inject  ClusterEventObserver(Event<Object> eventBus); @PreDestroy void shutdown(); void observeAllEvents(@Observes(notifyObserver = Reception.IF_EXISTS) Object event,
                                 EventMetadata metaData); void broadcast(Object event); static final String CHANNEL_NAME; }
@Test public void consumeTestOtherSenderNode() { observer.consumeMessage(eventBus, new ClusterSerializedCDIMessageWrapper("wrongNode", "json", "fqcn")); verify(eventBus).fire(any()); }