This is because the function name is not FOOBAR::test. The function (or more precisely method) name is test inside the class of FOOBAR.
Put another way, FOOBAR::test does not exist as a function. It's more like FOOBAR is a box with functions inside it, and the function name is test.
The call and schedule functions cannot access methods because it interprets the :: as part of the function name when in reality, as I've covered, it's not.
Solution: container function:
function FOOBAR::test() {
echo("FOOBAR::test called.");
}
function FOOBAR_test() {
FOOBAR::test();
}
schedule(1000, 0, FOOBAR_test);
The thing is, this should never be needed. You should only ever create methods as part of a class you intend to use with the first variable being the associated object of that class. If you need to call a method off a timer, use SimObject::schedule( timems , function name , args , ... ) on the object you've created to properly utilize classes.