    @Test
    public void filtersStackTraces() throws Exception {

        // Assumption - Shims are not filtered when filtering is disabled
        Traceur.enableLogging(new TraceurConfig(false));
        try {
            StreamFactory.createNullPointerExceptionObservable().blockingFirst();
            Assertions.failBecauseExceptionWasNotThrown(Throwable.class);
        } catch (Throwable t) {
            final String exceptionAsString = exceptionAsString(t);
            printStackTrace("Exception without filtering", exceptionAsString);

            assertThat(exceptionAsString).contains("TraceurException.java");
            assertThat(exceptionAsString).contains("ObservableOnAssembly.<init>");
        }

        // Enable filtering and ensure shims are filtered
        Traceur.enableLogging(new TraceurConfig(true));
        try {
            StreamFactory.createNullPointerExceptionObservable().blockingFirst();
            Assertions.failBecauseExceptionWasNotThrown(Throwable.class);
        } catch (Throwable t) {
            final String exceptionAsString = exceptionAsString(t);
            printStackTrace("Exception with filtering", exceptionAsString);

            assertThat(exceptionAsString).doesNotContain("TraceurException.java");
            assertThat(exceptionAsString).doesNotContain("ObservableOnAssembly.<init>");
        }
    }