Replace tests inheritance by a JUnit rule