I am looking for a embedded database which I can use in JUnit 4.12
tests. Because of the current nature of our code base & time-lines it is not possible for us to mock the database calls. We are concerned only about Mysql database. So I am looking for some kind of Embedded database which I can initialize before our each test run & then clear it after the tests. Some what similar to what wiremock does for http server.
I have gone through this & it seems it is possible to achieve it via H2 embedded database. Most of the links I have found in the web talks about using it with Spring.
Can some one let me know
I think you can use H2, but I prefer to use hsqldb for this purpose. I need some embedded db which can imitate some oracle-specific features in sql. From my best knowledge you can use any embedded java database for unit testing.