/**
* Regression test for a bug with selecting PrintStream.println() overloads.
*/
public void testPrintLn() throws Throwable {
final BeansLinker linker = new BeansLinker();
final LinkerServices linkerServices = LinkerServicesFactory.getLinkerServices(linker);
final Object out = System.out;
final CallSiteDescriptor desc = CallSiteDescriptorFactory.create(MethodHandles.publicLookup(),
"dyn:callMethod:println", MethodType.methodType(Object.class, Object.class, Object.class));
final LinkRequest req = new LinkRequestImpl(desc, false, out, "helloWorld");
linker.getGuardedInvocation(req, linkerServices).getInvocation().invokeWithArguments(out, "helloWorld");