TaskMessageQueue implements IMessageQueue<String> { @Override public IMessageReceiver<String> getReceiver() throws MessagingException { throw new UnsupportedOperationException("Cannot receive messages!"); } TaskMessageQueue(String url);   TaskMessageQueue(String host, int port); @Override IMessageReceiver<String> getReceiver(); @Override IMessageSender<String> createSender(); @Override void terminate();  }
@Test(expected = UnsupportedOperationException.class) public void testname() throws Exception { Messaging.createTaskQueue(HOSTNAME,1234).getReceiver(); }