66import com .rabbitmq .client .Connection ;
77import com .rabbitmq .client .ConnectionFactory ;
88import com .rabbitmq .jms .admin .RMQDestination ;
9- import org .junit .jupiter . api . AfterEach ;
10- import org .junit .jupiter . api . BeforeEach ;
11- import org .junit .jupiter . api . Test ;
9+ import org .junit .After ;
10+ import org .junit .Before ;
11+ import org .junit .Test ;
1212
1313import javax .jms .*;
1414import java .util .HashMap ;
1515import java .util .Map ;
1616import java .util .UUID ;
1717
18- import static org .junit .jupiter .api .Assertions .*;
18+ import static org .junit .Assert .*;
19+
1920
2021public class TtlIT extends AbstractITQueue {
2122
@@ -25,13 +26,13 @@ public class TtlIT extends AbstractITQueue {
2526
2627 Connection connection ;
2728
28- @ BeforeEach
29+ @ Before
2930 public void initAmqp () throws Exception {
3031 connection = new ConnectionFactory ().newConnection ();
3132 }
3233
33- @ AfterEach
34- void tearDownAmqp () throws Exception {
34+ @ After
35+ public void tearDownAmqp () throws Exception {
3536 connection .close ();
3637 }
3738
@@ -98,7 +99,7 @@ private Message publishAmqpConsumeJms(boolean expiration) throws Exception {
9899 null // options
99100 );
100101
101- Map <String , Object > hdrs = new HashMap <>();
102+ Map <String , Object > hdrs = new HashMap <String , Object >();
102103 hdrs .put ("JMSType" , "TextMessage" ); //
103104
104105 AMQP .BasicProperties .Builder propsBuilder = new AMQP .BasicProperties .Builder ();
@@ -118,8 +119,8 @@ private Message publishAmqpConsumeJms(boolean expiration) throws Exception {
118119 QueueReceiver queueReceiver = queueSession .createReceiver (queue );
119120 TextMessage message = (TextMessage ) queueReceiver .receive (TEST_RECEIVE_TIMEOUT );
120121
121- assertNotNull (message , "No message received" );
122- assertEquals (content , message . getText (), "Payload doesn't match" );
122+ assertNotNull ("No message received" , message );
123+ assertEquals ("Payload doesn't match" , content , message . getText () );
123124 return message ;
124125 }
125126
0 commit comments