@Test public void testSendMessage_single() { brokerProxy.sendMessage(stdBroker, message); verify(template, times(0)).send(any(String.class), any(MessageCreator.class)); stdBroker.setEnabled(true); brokerProxy.sendMessage(stdBroker, message); verify(template, times(1)).send(any(String.class), any(MessageCreator.class)); }
@Override public void sendMessage (Broker broker, Object messageObject) { if (broker.isEnabled()) visualizerProxyService.forwardMessage(messageObject); localSendMessage(broker, messageObject); }
BrokerProxyService implements BrokerProxy { @Override public void sendMessage (Broker broker, Object messageObject) { if (broker.isEnabled()) visualizerProxyService.forwardMessage(messageObject); localSendMessage(broker, messageObject); } }
BrokerProxyService implements BrokerProxy { @Override public void sendMessage (Broker broker, Object messageObject) { if (broker.isEnabled()) visualizerProxyService.forwardMessage(messageObject); localSendMessage(broker, messageObject); } BrokerProxyService(); }
BrokerProxyService implements BrokerProxy { @Override public void sendMessage (Broker broker, Object messageObject) { if (broker.isEnabled()) visualizerProxyService.forwardMessage(messageObject); localSendMessage(broker, messageObject); } BrokerProxyService(); @Override void sendMessage(Broker broker, Object messageObject); @Override void sendMessages(Broker broker, List<?> messageObjects); @Override void broadcastMessage(Object messageObject); @Override void broadcastMessages(List<?> messageObjects); @Override void routeMessage(Object message); @Override void registerBrokerMessageListener(Object listener, Class<?> msgType); @Override void setDeferredBroadcast(boolean b); @Override void broadcastDeferredMessages(); }
BrokerProxyService implements BrokerProxy { @Override public void sendMessage (Broker broker, Object messageObject) { if (broker.isEnabled()) visualizerProxyService.forwardMessage(messageObject); localSendMessage(broker, messageObject); } BrokerProxyService(); @Override void sendMessage(Broker broker, Object messageObject); @Override void sendMessages(Broker broker, List<?> messageObjects); @Override void broadcastMessage(Object messageObject); @Override void broadcastMessages(List<?> messageObjects); @Override void routeMessage(Object message); @Override void registerBrokerMessageListener(Object listener, Class<?> msgType); @Override void setDeferredBroadcast(boolean b); @Override void broadcastDeferredMessages();  }