### Question:
StackTraceFocuser implements Function<E, E> { @Nonnull public static <E extends Throwable> StackTraceFocuser<E> ignoreJavaClasses() { return ignoreClassNames(defaultClassNameIgnores); } StackTraceFocuser(@Nonnull final Iterable<Predicate<StackTraceElement>> ignores); @SafeVarargs  StackTraceFocuser(@Nonnull final Predicate<StackTraceElement> first,
            final Predicate<StackTraceElement>... rest); @Nonnull static StackTraceFocuser<E> ignoreClassNames(
            @Nonnull final List<Pattern> classNameIgnores); @Nonnull static StackTraceFocuser<E> ignoreJavaClasses(); @Override E apply(final E e); @Nonnull static Predicate<StackTraceElement> ignoreClassName(@Nonnull final Pattern className); @Nonnull static Predicate<StackTraceElement> ignoreMethodName(@Nonnull final Pattern methodName); @Nonnull static Predicate<StackTraceElement> ignoreFileName(@Nonnull final Pattern fileName); @Nonnull static Predicate<StackTraceElement> ignoreLineNumber(@Nonnull final Pattern lineNumber);  }### Answer:
@Test public void shouldIgnoreJavaClasses() { final Throwable x = new Throwable(); final StackTraceElement nonJava = new StackTraceElement("lotro.Bilbo", "smokes", "Bilbo.java", 5); x.setStackTrace(new StackTraceElement[]{ new StackTraceElement("java.lang.Frodo", "lives", "Frodo.java", 3), nonJava}); assertFramesRemaining(x, ignoreJavaClasses(), nonJava); }
@Test public void shouldIgnoreJavaxClasses() { final Throwable x = new Throwable(); final StackTraceElement nonJavax = new StackTraceElement("lotro.Bilbo", "smokes", "Bilbo.java", 5); x.setStackTrace(new StackTraceElement[]{ new StackTraceElement("javax.lang.Frodo", "lives", "Frodo.java", 3), nonJavax}); assertFramesRemaining(x, ignoreJavaClasses(), nonJavax); }
@Test public void shouldIgnoreSunClasses() { final Throwable x = new Throwable(); final StackTraceElement nonSun = new StackTraceElement("lotro.Bilbo", "smokes", "Bilbo.java", 5); x.setStackTrace(new StackTraceElement[]{ new StackTraceElement("sun.Frodo", "lives", "Frodo.java", 3), nonSun}); assertFramesRemaining(x, ignoreJavaClasses(), nonSun); }
@Test public void shouldIgnoreComSunClasses() { final Throwable x = new Throwable(); final StackTraceElement nonComSun = new StackTraceElement("lotro.Bilbo", "smokes", "Bilbo.java", 5); x.setStackTrace(new StackTraceElement[]{ new StackTraceElement("com.sun.Frodo", "lives", "Frodo.java", 3), nonComSun}); assertFramesRemaining(x, ignoreJavaClasses(), nonComSun); }