@Test
public void withoutOtherViolationOfPattern() {

    ViolationWeightFunction weightFunction = new PatternViolationsWeightFunction();
    double weight = weightFunction.getWeight(violation, overlaps, null);
    assertThat(weight, is(1.0));
}