Thread.sleep()

To continue with writing integration tests. When testing asynchronous operations, such as sending message to a queue, waiting for a response and completing some task, we need to introduce some kind of wait time in the test. Instead of using Thread.sleep(), we can use something called Awaitility… Documentation is pretty self explanatory… Testing asynchronous systems…

Spring Integration Testing – WireMock and MQ

When writing integration tests for parts of the application that talk to other applications, for example calling REST APIs or sending JMS messages, sometimes we just want to test the application and not do end to end test. In this case, we would need to mock these other applications or their behavior. Mocking REST For…