### Question:
LatticeHelper { static Lattice createLattice(LevelFunction levelFunction) { int columnPairs = levelFunction.size(); Lattice lattice = new LatticeImpl(levelFunction); MDSite lhs = new MDSiteImpl(columnPairs); for (int rhsAttr = 0; rhsAttr < columnPairs; rhsAttr++) { MD md = createMD(lhs, rhsAttr); lattice.add(md); } return lattice; }    }### Answer:
@Test public void testCreate() { int columnPairs = 4; Lattice lattice = LatticeHelper.createLattice(new Cardinality(columnPairs)); assertThat(lattice.getDepth()).isEqualTo(0); assertThat(lattice.getLevel(0)).hasSize(1); assertThat(lattice.containsMdOrGeneralization( new MDImpl(new MDSiteImpl(columnPairs), new MDElementImpl(0, SimilarityMeasure.MAX_SIMILARITY)))).isEqualTo(true); assertThat(lattice.containsMdOrGeneralization( new MDImpl(new MDSiteImpl(columnPairs), new MDElementImpl(1, SimilarityMeasure.MAX_SIMILARITY)))).isEqualTo(true); assertThat(lattice.containsMdOrGeneralization( new MDImpl(new MDSiteImpl(columnPairs), new MDElementImpl(2, SimilarityMeasure.MAX_SIMILARITY)))).isEqualTo(true); assertThat(lattice.containsMdOrGeneralization( new MDImpl(new MDSiteImpl(columnPairs), new MDElementImpl(3, SimilarityMeasure.MAX_SIMILARITY)))).isEqualTo(true); }