### Question:
ResultLattice { public boolean insert(Result node) { if (valid(node)) { int l = node.getEmbeddedFD().lhs.cardinality(); if (! layers.containsKey(l)) { layers.put(l, new LinkedList<Result>()); } if (!layers.get(l).contains(node)) { layers.get(l).add(node); } return true; } return false; } ResultLattice(int rhs);  ResultLattice(Result root); boolean insert(Result node); List<Result> getLayer(int i); int size(); boolean contains(BitSet lhs, int rhs); boolean contains(Result node); List<Result> getParents(Result child); List<Result> getChildren(Result node); List<Result> getLeaves();  }### Answer:
@Test public void testInsertNotPossibleForDifferentRhs() { Result node = mockResult(mockFD(new int[]{0, 4, 7, 9}, 3)); Result child = mockResult(mockFD(new int[]{4, 7, 9}, 3)); Result offendingResult = mockResult(mockFD(new int[] {4, 7}, 1)); ResultLattice lattice = new ResultLattice(node); lattice.insert(child); boolean inserted = lattice.insert(offendingResult); Assert.assertFalse(inserted); }