public static boolean errorIsExpected(Error failure) {
    return expectedClass != null && expectedClass.isInstance(failure);
  }
Returns true if the given failure is expected.
geode-core/src/main/java/org/apache/geode/internal/SystemFailureTestHook.java