### Question:
MessageSenderImpl implements MessageSender<T> { @Override public void send(final T message) throws MessageSendException { messageQueue.send(message); } MessageSenderImpl(final MessageQueue<T> messageQueue); @Override void send(final T message); @Override void sendDelayedMessage(final T message, final int delaySeconds);  }### Answer:
@Test public void shouldSend_withMessage() { messageSenderImpl.send(mockMessage); verify(mockMessageQueue).send(mockMessage); }
@Test public void shouldThrowMessageSendException_onExceptionFromSend() { final MessageSendException messageSendException = mock(MessageSendException.class); doThrow(messageSendException).when(mockMessageQueue).send(any(Message.class)); MessageSendException thrownException = null; try { messageSenderImpl.send(mockMessage); } catch (final MessageSendException e) { thrownException = e; } assertSame(messageSendException, thrownException); }