### Question:
SubSetGraph { public ArrayList<ColumnCombinationBitset> getExistingSubsets( ColumnCombinationBitset columnCombinationToQuery) { ArrayList<ColumnCombinationBitset> subsets = new ArrayList<>(); if (this.isEmpty()) { return subsets; } Queue<SubSetFindTask> openTasks = new LinkedList<>(); openTasks.add(new SubSetFindTask(this, 0, new ColumnCombinationBitset())); while (!openTasks.isEmpty()) { SubSetFindTask currentTask = openTasks.remove(); if (currentTask.subGraph.isEmpty()) { subsets.add(new ColumnCombinationBitset(currentTask.path)); continue; } if (currentTask.subGraph.subSetEnds) { subsets.add(new ColumnCombinationBitset(currentTask.path)); } for (int i = currentTask.numberOfCheckedColumns; i < columnCombinationToQuery.size(); i++) { int currentColumnIndex = columnCombinationToQuery.getSetBits().get(i); SubSetGraph subGraph = currentTask.subGraph.subGraphs.get(currentColumnIndex); if (subGraph != null) { ColumnCombinationBitset path = new ColumnCombinationBitset(currentTask.path) .addColumn(currentColumnIndex); openTasks.add(new SubSetFindTask(subGraph, i + 1, path)); } } } return subsets; }  SubSetGraph add(ColumnCombinationBitset columnCombination); SubSetGraph addAll(Collection<ColumnCombinationBitset> columnCombinations); ArrayList<ColumnCombinationBitset> getExistingSubsets(
    ColumnCombinationBitset columnCombinationToQuery); boolean containsSubset(ColumnCombinationBitset superset); Set<ColumnCombinationBitset> getMinimalSubsets(); boolean isEmpty(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void testGetExistingSubsets() { SubSetGraphFixture fixture = new SubSetGraphFixture(); SubSetGraph graph = fixture.getGraph(); ColumnCombinationBitset columnCombinationToQuery = fixture.getColumnCombinationForSubsetQuery(); List<ColumnCombinationBitset> actualSubsets = graph.getExistingSubsets(columnCombinationToQuery); assertThat(actualSubsets, IsIterableContainingInAnyOrder .containsInAnyOrder(fixture.getExpectedSubsetsFromQuery())); }