@SuppressWarnings("unchecked") private static <T extends Comparable<T>> void expectFail(Assertion assertion, T... args) throws Exception { try { Assertion.run(assertion, args); } catch (RuntimeException e) { return; } throw new Exception( "Expected " + Assertion.format(assertion, (Object[]) args) + " to throw a RuntimeException"); }
@SuppressWarnings("unchecked") private static <T extends Comparable<T>> void expectPass(Assertion assertion, T... args) throws Exception { Assertion.run(assertion, args); }