@Test
    public void managed_send_and_receive_is_working() throws JMSException {
        testSender1.send("MANAGED");

        try {
            managed.await(1, TimeUnit.SECONDS);

            Assertions.assertThat(textManaged).isEqualTo("MANAGED");
        } catch (InterruptedException e) {
            fail("Thread interrupted");
        }
    }
@ Test public void managed_send_and_receive_is_working ( ) throws JMSException { testSender1 . send ( "MANAGED" ) ; try { managed . await ( 1 , TimeUnit . SECONDS ) ; Assertions . assertThat ( textManaged ) . isEqualTo ( "MANAGED" ) ; } catch ( InterruptedException e ) { fail ( "Thread interrupted" ) ; } }
TestSender1 and TestMessageListener1.