@Test
public void testImplementsAllMethods() {

    Set<MethodSignature> glowrootLoggerMethods = Sets.newHashSet();
    for (Method method : Logger.class.getMethods()) {
        ImmutableMethodSignature.Builder builder = ImmutableMethodSignature.builder()
                .name(method.getName());
        for (Class<?> clazz : method.getParameterTypes()) {
            String parameterType = clazz.getName();
            builder.addParameterTypes(parameterType.replaceFirst("org.glowroot.agent.jul.",
                    "java.util.logging."));
        }
        glowrootLoggerMethods.add(builder
                .returnType(method.getReturnType().getName()
                        .replaceFirst("org.glowroot.agent.jul.", "java.util.logging."))
                .build());
    }
    Set<MethodSignature> loggerMethods = Sets.newHashSet();
    for (Method method : java.util.logging.Logger.class.getMethods()) {
        String methodName = method.getName();
        if (methodName.contains("Handler") || methodName.contains("Filter")) {
            continue;
        }
        ImmutableMethodSignature.Builder builder = ImmutableMethodSignature.builder()
                .name(methodName);
        List<String> parameterTypes = Lists.newArrayList();
        for (Class<?> clazz : method.getParameterTypes()) {
            parameterTypes.add(clazz.getName());
        }
        if (parameterTypes.contains("java.util.function.Supplier")) {
            // FIXME it would be good to include Java 8 methods
            continue;
        }
        loggerMethods.add(builder
                .addAllParameterTypes(parameterTypes)
                .returnType(method.getReturnType().getName())
                .build());
    }
    assertThat(glowrootLoggerMethods).containsAll(loggerMethods);
}