@Test
public void calculatesPatternSupportWeight_equallySizedPatternWithSmallerSupport() {

    APIUsagePattern pattern2 = somePattern(pattern, 1);
    model = () -> asSet(pattern, pattern2);
    ViolationWeightFunction weightFunction = new PatternSameSizeSupportWeightFunction();
    double weight = weightFunction.getWeight(violation, null, model);
    assertThat(weight, is(1.0));
}