Added JUnit @Rule to guide tests more uniformly