### Question:
SimilaritySetProcessor { @Timed Statistics process(SimilaritySet similaritySet) { return with(similaritySet).process(); }    }### Answer:
@SuppressWarnings("unchecked") @Test public void test() { SimilaritySetProcessor processor = createProcessor(); SimilaritySet similaritySet = Mockito.mock(SimilaritySet.class); LatticeMD latticeMD = Mockito.mock(LatticeMD.class); MDSite lhs = Mockito.mock(MDSite.class); when(latticeMD.getLhs()).thenReturn(lhs); when(lattice.findViolated(similaritySet)) .thenReturn(Collections.singletonList(latticeMD), Collections.emptyList()); int rhsAttr = 0; MDElement rhs = new MDElementImpl(rhsAttr, 0.5); when(latticeMD.getRhs()).thenReturn(Collections.singletonList(rhs)); when(Boolean.valueOf(similaritySet.isViolated(rhs))).thenReturn(Boolean.TRUE); when(Double.valueOf(similaritySet.get(rhsAttr))).thenReturn(Double.valueOf(0.4)); when(specializer.specialize(lhs, rhs, similaritySet)).thenReturn(Collections.emptyList()); when(Boolean.valueOf(latticeMD.wouldBeMinimal(new MDElementImpl(rhsAttr, 0.4)))).thenReturn(Boolean.FALSE); processor.process(similaritySet); verify(latticeMD).removeRhs(rhsAttr); verify(lattice, never()).addIfMinimalAndSupported(any()); }