### Question:
SimilaritySet { public boolean isViolated(MDElement element) { int attr = element.getId(); return element.getThreshold() > similaritySet[attr]; }  double get(int attr); boolean isViolated(MDElement element); int size(); @Override String toString();  }### Answer:
@Test public void testIsViolated() { SimilaritySet similaritySet = new SimilaritySet(new double[]{0.2, 0.3}); assertThat(similaritySet.isViolated(new MDElementImpl(0, 0.1))).isFalse(); assertThat(similaritySet.isViolated(new MDElementImpl(0, 0.2))).isFalse(); assertThat(similaritySet.isViolated(new MDElementImpl(0, 0.3))).isTrue(); }