Skip to content

ugli/jocote

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jocote – JMS made easy


import static org.hamcrest.CoreMatchers.equalTo;
import static org.junit.Assert.assertThat;
import static se.ugli.jocote.DriverManager.getConnection;

import java.util.Optional;
import org.junit.Test;
import se.ugli.jocote.*;

try (Connection connection = getConnection("activemq:/TEST")) {
    connection.put("hello world");
    Optional<String> msgOpt = connection.get();
    assertThat(msgOpt.isPresent(), equalTo(true));
    assertThat(msgOpt.get(), equalTo("hello world"));
}