assertBooReturns(2, linkerServices, 1, 2);
// If we're linking with a converter that knows how to convert double to int, then we want to make sure we
// don't link to the vararg (Class, int[]) invocation but to the (Class, int) invocation.
final LinkerServices ls = new LinkerServicesImpl(new TypeConverterFactory(Collections.singleton(
new GuardingTypeConverterFactory() {
@Override
public GuardedInvocation convertToType(Class<?> sourceType, Class<?> targetType) {
if(targetType == int.class) {
return new GuardedInvocation(new Lookup(MethodHandles.publicLookup()).findVirtual(
Double.class, "intValue", MethodType.methodType(int.class)).asType(