@Test
  public void usingRuleAsRuleAndClassRuleShouldInvokeBeforeClass() {
    Result result = TestRunner.runTest(UsingRuleAsRuleAndClassRule.class);

    assertThat(result.wasSuccessful()).isTrue();
    assertThat(UsingRuleAsRuleAndClassRule.staticRule.beforeClassInvoked).isEqualTo(true);
  }
Example usage of a rule as both a method {@literal @}Rule and a {@literal @}ClassRule.
geode-junit/src/test/java/org/apache/geode/test/junit/rules/examples/RuleAndClassRuleTest.java