It should work ... But since you are working with the spring framework, and JUnit 4 was introduced many years ago, I suggest you use annotations instead of inheritance.
So annotate the class with @RunWith(SpringJUnit4ClassRunner.class)
. Remove extends AbstractTransactionalDataSourceSpringContextTests
.
Remember to make @Before and @After static methods
Now that should work.
Even if you want to extend the spring testing classes, at least note that some of them are deprecated. For example, the AbstractTransactionalDataSourceSpringContextTests
class is deprecated.
source share