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…

Multiple projects inside one IntelliJ instance

When you are working with multiple projects, for example a number of microservices, it becomes problematic to have an IntelliJ instance open for each of those. There is a trick that allows us to have multiple projects open inside one IntelliJ instance (this saves time, space and RAM :)). Basics steps are as follows: Create…