Added latch check into the jms component test.