Avoiding compilation errors with @Before and @After