By default, @Transactional tests will roll-back all changes when the
test method completes. So even if the test passes, the changes are only
valid for the current running Transaction. To persist your changes, you
need to commit the transaction.
Check out the example on this
You can replace @Transactional with transactionTemplate to commit the
transaction prior to finishing a test.