### Question:
TraceeTopicPublisher implements TopicPublisher { @Override public void send(Message message) throws JMSException { messageProducer.send(message); } TraceeTopicPublisher(TraceeMessageProducer messageProducer, TopicPublisher delegate); @Override Topic getTopic(); @Override void publish(Message message); @Override void publish(Message message, int deliveryMode, int priority, long timeToLive); @Override void publish(Topic topic, Message message); @Override void publish(Topic topic, Message message, int deliveryMode, int priority, long timeToLive); @Override void send(Message message); @Override void send(Message message, int deliveryMode, int priority, long timeToLive); @Override void send(Destination destination, Message message); @Override void send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive); @Override void setDisableMessageID(boolean value); @Override boolean getDisableMessageID(); @Override void setDisableMessageTimestamp(boolean value); @Override boolean getDisableMessageTimestamp(); @Override void setDeliveryMode(int deliveryMode); @Override int getDeliveryMode(); @Override void setPriority(int defaultPriority); @Override int getPriority(); @Override void setTimeToLive(long timeToLive); @Override long getTimeToLive(); @Override Destination getDestination(); @Override void close();  }### Answer:
@Test public void sendMessageShouldAddContextAndDelegate() throws Exception { unit.send(message); verify(message).setStringProperty(eq(TraceeConstants.TPIC_HEADER), anyString()); verify(messageProducer).send(message); }
@Test public void sendMessageWithDestinationShouldAddContextAndDelegate() throws Exception { final Destination destination = mock(Destination.class); unit.send(destination, message); verify(message).setStringProperty(eq(TraceeConstants.TPIC_HEADER), anyString()); verify(messageProducer).send(destination, message); }
@Test public void sendMessageWithDeliveryModeAndPriorityAndTTLShouldAddContextAndDelegate() throws Exception { unit.send(message, DeliveryMode.PERSISTENT, 5, 100); verify(message).setStringProperty(eq(TraceeConstants.TPIC_HEADER), anyString()); verify(messageProducer).send(message, DeliveryMode.PERSISTENT, 5, 100); }
@Test public void sendMessageWithDestinationAndDeliveryModeAndPriorityAndTTLShouldAddContextAndDelegate() throws Exception { final Destination destination = mock(Destination.class); unit.send(destination, message, DeliveryMode.PERSISTENT, 5, 100); verify(message).setStringProperty(eq(TraceeConstants.TPIC_HEADER), anyString()); verify(messageProducer).send(destination, message, DeliveryMode.PERSISTENT, 5, 100); }