Set<ContributionDef> defs = md.getContributionDefs();
assertEquals(defs.size(), 1);
ContributionDef cd = defs.iterator().next();
// The target service id is derived from the method name
assertEquals(cd.getServiceId(), expectedServiceId);
// Can't be exact, because the source file & line number are probably attached (and those
// can change)
assertTrue(cd.toString().contains(moduleClass.getName() + "." + expectedMethodSignature));
verify();
}