Containers for Real Integration Tests
So what is the solution? There are some very neat solutions based on containers, namely the Docker-Maven-Plugin and TestContainers. From your tests you can start a lightweight, throwaway instance of your datastore and this talk will walk you through how to do that.