protected function assertUserDefinedFunction()
{
// Get the UDF from the current keyspace
$keyspace = $this->session->schema()->keyspace($this->keyspaceName);
$function = $keyspace->function("user_defined_function", Type::int(), Type::int());
$expectedArguments = array("rhs" => "int", "lhs" => "int");
// Assert the UDF
$this->assertEquals("user_defined_function", $function->simpleName());
$arguments = array();
foreach ($function->arguments() as $name => $argument) {
$arguments[$name] = "{$argument}";
}
$this->assertEquals($expectedArguments, $arguments);
$this->assertEquals("int", $function->returnType());
$this->assertEquals("user_defined_function(int,int)", $function->signature());
$this->assertEquals("javascript", $function->language());
$this->assertEquals("lhs + rhs", $function->body());
$this->assertEquals(false, $function->isCalledOnNullInput());
}