public void check_varargs() throws Throwable {
Lookup lookup = lookup();
String name = "fr#insalyon#citi#golo#runtime#FunctionCallSupportTest$Foo#concat";
MethodType type = MethodType.methodType(Object.class, Object.class, Object.class, Object.class, Object.class);
CallSite callSite = FunctionCallSupport.bootstrap(lookup, name, type);
assertThat((String) callSite.dynamicInvoker().invokeWithArguments("-", "a", "b", "c"), is("a-b-c"));
type = MethodType.methodType(Object.class, Object.class, Object.class);
callSite = FunctionCallSupport.bootstrap(lookup, name, type);
assertThat((String) callSite.dynamicInvoker().invokeWithArguments("-", new String[]{"a", "b", "c"}), is("a-b-c"));
}