### Question:
SuperSetGraph { public SuperSetGraph add(ColumnCombinationBitset columnCombination) { graph.add(columnCombination.invert(numberOfColumns)); return this; } SuperSetGraph(int numberOfColumns); SuperSetGraph add(ColumnCombinationBitset columnCombination); SuperSetGraph addAll(Collection<ColumnCombinationBitset> columnCombinations); ArrayList<ColumnCombinationBitset> getExistingSupersets(ColumnCombinationBitset subset); boolean containsSuperset(ColumnCombinationBitset subset); boolean isEmpty(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void testAdd() { SuperSetGraph graph = new SuperSetGraph(fixture.getNumberOfColumns()); ColumnCombinationBitset columnCombination = new ColumnCombinationBitset(2, 4, 7); SuperSetGraph graphAfterAdd = graph.add(columnCombination); SubSetGraph actualSubGraph = graph.graph; for (int setColumnIndex : columnCombination.invert(fixture.getNumberOfColumns()).getSetBits()) { assertTrue(actualSubGraph.subGraphs.containsKey(setColumnIndex)); actualSubGraph = actualSubGraph.subGraphs.get(setColumnIndex); } assertSame(graph, graphAfterAdd); }
@Test public void testEqualsAndHashCode() { SuperSetGraph actualGraph = new SuperSetGraph(fixture.getNumberOfColumns()); SuperSetGraph equalsGraph = new SuperSetGraph(fixture.getNumberOfColumns()); SuperSetGraph notEqualsGraph = new SuperSetGraph(25); actualGraph.add(new ColumnCombinationBitset(2, 5, 9)); actualGraph.add((new ColumnCombinationBitset(2, 5, 8))); equalsGraph.add((new ColumnCombinationBitset(2, 5, 8))); equalsGraph.add(new ColumnCombinationBitset(2, 5, 9)); notEqualsGraph.add(new ColumnCombinationBitset(2, 5, 12, 20)); notEqualsGraph.add((new ColumnCombinationBitset(2, 5, 10, 15))); EqualsAndHashCodeTester<SuperSetGraph> tester = new EqualsAndHashCodeTester<>(); tester.performBasicEqualsAndHashCodeChecks(actualGraph, equalsGraph, notEqualsGraph); }