### Question:
Tracer { public static void setExceptionPredicate(Predicate<Throwable> exceptionPredicate) { AssertUtil.notNull(exceptionPredicate, "exception predicate must not be null"); Tracer.exceptionPredicate = exceptionPredicate; } protected  Tracer(); static void trace(Throwable e); @Deprecated static void trace(Throwable e, int count); static void traceContext(Throwable e, Context context); @Deprecated static void traceContext(Throwable e, int count, Context context); static void traceEntry(Throwable e, Entry entry); @SafeVarargs static void setExceptionsToTrace(Class<? extends Throwable>... traceClasses); static Class<? extends Throwable>[] getExceptionsToTrace(); @SafeVarargs static void setExceptionsToIgnore(Class<? extends Throwable>... ignoreClasses); static Class<? extends Throwable>[] getExceptionsToIgnore(); static Predicate<? extends Throwable> getExceptionPredicate(); static void setExceptionPredicate(Predicate<Throwable> exceptionPredicate);  }### Answer:
@Test public void setExceptionPredicate() { Predicate<Throwable> throwablePredicate = new Predicate<Throwable>() { @Override public boolean test(Throwable throwable) { if (throwable instanceof TraceException) { return true; } else if (throwable instanceof IgnoreException) { return false; } return false; } }; Tracer.setExceptionPredicate(throwablePredicate); Assert.assertTrue(Tracer.shouldTrace(new TraceException())); Assert.assertFalse(Tracer.shouldTrace(new IgnoreException())); }
@Test(expected = IllegalArgumentException.class) public void testNull3() { Tracer.setExceptionPredicate(null); }