### Question:
BrokerProxyService implements BrokerProxy { @Override public void sendMessages (Broker broker, List<?> messageObjects) { for (Object message : messageObjects) { sendMessage(broker, message); } } 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();  }### Answer:
@Test public void testSendMessage_multiple() { List<Object> messageList = new ArrayList<Object>(); messageList.add(message); messageList.add(new CustomerInfo("t2", 22)); messageList.add(new CustomerInfo("t3", 23)); brokerProxy.sendMessages(stdBroker, messageList); verify(template, times(0)).send(any(String.class), any(MessageCreator.class)); stdBroker.setEnabled(true); brokerProxy.sendMessages(stdBroker, messageList); verify(template, times(messageList.size())).send(any(String.class), any(MessageCreator.class)); }