Source:
<code>void ensureJupiterExtensionApisAreComposable() { List<Class<?>> extensionApis = ReflectionUtils.findAllClassesInPackage(Extension.class.getPackage().getName(), this::isExtensionApi, name -> true); List<Method> expectedMethods = extensionApis.stream() .map(Class::getDeclaredMethods) .flatMap(Arrays::stream) .collect(toList()); List<String> expectedMethodSignatures = expectedMethods.stream() .map(this::methodSignature) .filter(name -> !name.contains("jacoco")) <START> .sorted() <END> .collect(toList()); List<String> expectedMethodNames = expectedMethods.stream() .map(Method::getName) .filter(name -> !name.contains("jacoco")) .sorted() .collect(toList()); Object dynamicKitchenSinkExtension = Proxy.newProxyInstance(getClass().getClassLoader(), extensionApis.toArray(new Class<?>[0]), (proxy, method, args) -> null); List<Method> actualMethods = Arrays.stream(dynamicKitchenSinkExtension.getClass().getDeclaredMethods()) .collect(toList()); List<String> actualMethodSignatures = actualMethods.stream() .map(this::methodSignature) .distinct() .sorted() .collect(toList()); List<String> actualMethodNames = actualMethods.stream() .map(Method::getName) .distinct() .sorted() .collect(toList()); actualMethodSignatures.remove("equals(Object)"); actualMethodSignatures.remove("hashCode()"); actualMethodSignatures.remove("toString()"); actualMethodNames.remove("equals"); actualMethodNames.remove("hashCode"); actualMethodNames.remove("toString"); assertLinesMatch(expectedMethodSignatures, actualMethodSignatures); assertLinesMatch(expectedMethodNames, actualMethodNames); }</code><technical_language>jacoco methods chance "synthetic"? If so, please simply filter out synthetic methods instead of checking if method name contains "jacoco". In case, please push this master is related this PR adopted ASAP anyway</technical_language>

Target:
void ensureJupiterExtensionApisAreComposable() { List<Class<?>> extensionApis = ReflectionUtils.findAllClassesInPackage(Extension.class.getPackage().getName(), this::isExtensionApi, name -> true); List<Method> expectedMethods = extensionApis.stream() .map(Class::getDeclaredMethods) .flatMap(Arrays::stream) .collect(toList()); List<String> expectedMethodSignatures = expectedMethods.stream() .map(this::methodSignature) .sorted() .collect(toList()); List<String> expectedMethodNames = expectedMethods.stream() .map(Method::getName) .sorted() .collect(toList()); Object dynamicKitchenSinkExtension = Proxy.newProxyInstance(getClass().getClassLoader(), extensionApis.toArray(new Class<?>[extensionApis.size()]), (proxy, method, args) -> null); List<Method> actualMethods = Arrays.stream(dynamicKitchenSinkExtension.getClass().getDeclaredMethods()) .collect(toList()); List<String> actualMethodSignatures = actualMethods.stream() .map(this::methodSignature) .distinct() .sorted() .collect(toList()); List<String> actualMethodNames = actualMethods.stream() .map(Method::getName) .distinct() .sorted() .collect(toList()); actualMethodSignatures.remove("equals(Object)"); actualMethodSignatures.remove("hashCode()"); actualMethodSignatures.remove("toString()"); actualMethodNames.remove("equals"); actualMethodNames.remove("hashCode"); actualMethodNames.remove("toString"); assertAll( () -> assertThat(actualMethodSignatures).isEqualTo(expectedMethodSignatures), () -> assertThat(actualMethodNames).isEqualTo(expectedMethodNames) ); }