All the answers before mine are useful so I won't repeat the same information.
Yes, if in your test you hit a database then it's not a unit but an integration test, or as it is called in the javascript community, end-to-end (but I don't know why they did not stuck with the same terminology).
From my experience it is better to start a transaction in the @Before
and to reject it in the @After
method. In this way you can be sure that your results are as close as possible to the real world since you are not mocking the database access (so you can detect if a problem happens on the database side).
You will also see a lot of opinions in the other way around, with people wanting to mock the database access so the tests can run faster, but I think the speed, in this time and age, will not be an issue anymore so you can hit the database and not mock it :)