void (CoverageSuite suite) { Optional<CoverageSuitesBundle> containingBundle = myActiveBundles.values().stream().filter(b -> b.contains(suite)).findFirst(); if (containingBundle.isPresent()) { CoverageSuitesBundle bundle = containingBundle.get(); CoverageSuite[] suites = bundle.getSuites(); if (suites.length > 1) { suites = ArrayUtil.remove(suites, suite); chooseSuitesBundle(new CoverageSuitesBundle(suites)); } else { closeSuitesBundle(bundle); } } }