### Question:
ReduceBasedDiagnosisHittingSetBuilder { Set<Set<DiagnosisElement>> filterMinimalDiagnosisHittingSets(Set<Set<DiagnosisElement>> selections) { final Set<Set<DiagnosisElement>> filtered = new LinkedHashSet<>(); for(Set<DiagnosisElement> selection : selections) { if(isMinimalDiagnosisHittingSet(selection, selections)) { filtered.add(selection); } } return filtered; } ReduceBasedDiagnosisHittingSetBuilder(TestModel testModel); List<DiagnosisHittingSet> computeMinimalDiagnosisHittingSets(List<MissingInvalidTuple> mits);  }### Answer:
@Test void testFilterMinimalDiagnosisHittingSets() { final TestModel model = mock(TestModel.class); final Set<Set<DiagnosisElement>> hittingSets = new HashSet<>(asList( new HashSet<>(asList( new DiagnosisElement(1, new int[] {0}, new int[]{2}), new DiagnosisElement(4, new int[] {0, 1}, new int[]{0, 2}), new DiagnosisElement(5, new int[] {0, 1}, new int[]{1, 2}))), new HashSet<>(asList( new DiagnosisElement(4, new int[] {0, 1}, new int[]{0, 2}), new DiagnosisElement(5, new int[] {0, 1}, new int[]{1, 2}))), new HashSet<>(asList( new DiagnosisElement(4, new int[] {0, 1}, new int[]{0, 2}), new DiagnosisElement(2, new int[] {1}, new int[]{2}))), new HashSet<>(singletonList( new DiagnosisElement(2, new int[]{1}, new int[]{2}))) )); final ReduceBasedDiagnosisHittingSetBuilder builder = new ReduceBasedDiagnosisHittingSetBuilder(model); final Set<Set<DiagnosisElement>> minimalHittingSets = builder.filterMinimalDiagnosisHittingSets(hittingSets); assertEquals(2, minimalHittingSets.size()); assertTrue(contains(minimalHittingSets, new int[] {2}, new int[] {1}, new int[] {2})); assertTrue(contains(minimalHittingSets, new int[] {4}, new int[] {0, 1}, new int[] {0, 2}, new int[] {5}, new int[] {0, 1}, new int[] {1, 2})); }