@Test
public void computesSinglePatternWeight() throws Exception {

    Overlap overlap = someOverlap();
    APIUsagePattern pattern = overlap.getPattern();
    Model model = () -> asSet(pattern);
    ViolationWeightFunction weightFunction = new PatternSupportWeightFunction();
    double weight = weightFunction.getWeight(overlap, null, model);
    assertThat(weight, is(1.0));
}