EmbeddedActiveMQResource extends ExternalResource { public void sendMessage(String address, ClientMessage message) { sendMessage(SimpleString.toSimpleString(address), message); } EmbeddedActiveMQResource();  EmbeddedActiveMQResource(int serverId);  EmbeddedActiveMQResource(Configuration configuration);  EmbeddedActiveMQResource(String filename); static void addMessageProperties(ClientMessage message, Map<String, Object> properties); void start(); void stop(); boolean isUseDurableMessage(); void setUseDurableMessage(boolean useDurableMessage); boolean isUseDurableQueue(); void setUseDurableQueue(boolean useDurableQueue); long getDefaultReceiveTimeout(); void setDefaultReceiveTimeout(long defaultReceiveTimeout); EmbeddedActiveMQ getServer(); String getServerName(); String getVmURL(); long getMessageCount(String queueName); long getMessageCount(SimpleString queueName); Queue locateQueue(String queueName); Queue locateQueue(SimpleString queueName); List<Queue> getBoundQueues(String address); List<Queue> getBoundQueues(SimpleString address); Queue createQueue(String name); Queue createQueue(String address, String name); Queue createQueue(SimpleString address, SimpleString name); void createSharedQueue(String name, String user); void createSharedQueue(String address, String name, String user); void createSharedQueue(SimpleString address, SimpleString name, SimpleString user); ClientMessage createMessage(); ClientMessage createMessage(byte[] body); ClientMessage createMessage(String body); ClientMessage createMessageWithProperties(Map<String, Object> properties); ClientMessage createMessageWithProperties(byte[] body, Map<String, Object> properties); ClientMessage createMessageWithProperties(String body, Map<String, Object> properties); void sendMessage(String address, ClientMessage message); ClientMessage sendMessage(String address, byte[] body); ClientMessage sendMessage(String address, String body); ClientMessage sendMessageWithProperties(String address, Map<String, Object> properties); ClientMessage sendMessageWithProperties(String address, byte[] body, Map<String, Object> properties); ClientMessage sendMessageWithProperties(String address, String body, Map<String, Object> properties); void sendMessage(SimpleString address, ClientMessage message); ClientMessage sendMessage(SimpleString address, byte[] body); ClientMessage sendMessage(SimpleString address, String body); ClientMessage sendMessageWithProperties(SimpleString address, Map<String, Object> properties); ClientMessage sendMessageWithProperties(SimpleString address, byte[] body, Map<String, Object> properties); ClientMessage sendMessageWithProperties(SimpleString address, String body, Map<String, Object> properties); ClientMessage receiveMessage(String queueName); ClientMessage receiveMessage(String queueName, long timeout); ClientMessage receiveMessage(SimpleString queueName); ClientMessage receiveMessage(SimpleString queueName, long timeout); ClientMessage browseMessage(String queueName); ClientMessage browseMessage(String queueName, long timeout); ClientMessage browseMessage(SimpleString queueName); ClientMessage browseMessage(SimpleString queueName, long timeout);  }
@Test public void testSendBytes() throws Exception { sent = server.sendMessage(TEST_ADDRESS, TEST_BODY.getBytes()); }
@Test public void testSendString() throws Exception { sent = server.sendMessage(TEST_ADDRESS, TEST_BODY); }