I would like to unit test my DB independent web layer controllers even if the database is down.
But the transactionManager
bean instantiation fails because the connection cannot be achieved by the bean dataSource
with the given DB credentials.
Also, I have used @Transactional
, @AfterTransaction
and @BeforeTransaction
annotations which I do not want to remove.
Is there a way to define a dummy (or mock) dataSource
where I need not provide any database credentials but still get my transactionManager
bean to be instantiated?