DefaultJmsEnvelopeSender implements JmsEnvelopeSender { @Override public void send(final JsonEnvelope envelope, final String destinationName) { jmsSender.send(envelope, destinationName); } DefaultJmsEnvelopeSender(final JmsSender jmsSender); @Override void send(final JsonEnvelope envelope, final String destinationName);  }
@Test public void shouldPublishValidEnvelopeToDestination() throws Exception { final String destinationName = "destination name"; final JsonEnvelope jsonEnvelope = mock(JsonEnvelope.class); jmsEnvelopeSender.send(jsonEnvelope, destinationName); verify(jmsSender).send(jsonEnvelope, destinationName); }