Wondering if it is possible to get rid completely of SQL dependency. Let's say I'm writing test which communicates with DB, this introduces the need to manage DB schema, this is very cumbersome as in-memory DB often do not match to production type DBs.
Would it be possible to test with Hibernate/JPA and no underline DB Schema?
I know so far of two options, I'd like here to broaden my knowledge, if there are any other possibilities, please share.
- mock the hibernate
- use fake JDBC driver
Or should I just focus on mocking DAO layer and not wasting time with this at all? Sanity checking JPA entities vs DB is completely different story.