Filter (TestConsoleProperties properties) { final boolean shouldFilterPassed = TestConsoleProperties.HIDE_PASSED_TESTS.value(properties); final Filter hidePassedFilter = shouldFilterPassed ? Filter.NOT_PASSED.or(Filter.DEFECT) : Filter.NO_FILTER; final boolean shouldFilterIgnored = TestConsoleProperties.HIDE_IGNORED_TEST.value(properties); final Filter hideIgnoredFilter; if (shouldFilterIgnored) { final Filter ignoredFilter = Filter.IGNORED.not(); hideIgnoredFilter = !shouldFilterPassed ? ignoredFilter.or(Filter.HAS_PASSED) : ignoredFilter; } else { hideIgnoredFilter = Filter.NO_FILTER; } final boolean hideSuccessfulConfigs = TestConsoleProperties.HIDE_SUCCESSFUL_CONFIG.value(properties); final Filter hideConfigsFilter = hideSuccessfulConfigs ? Filter.HIDE_SUCCESSFUL_CONFIGS : Filter.NO_FILTER; return hidePassedFilter.and(hideIgnoredFilter).and(hideConfigsFilter); }