echo "test failed2\n";
    exit(2);
} catch (JavaException $e) {
    echo "test okay <br>\n";
}
try {
    // must succeed
    echo $ar->array(array(1 => $ar, 2 => $ar, 3 => $ar));
    echo "<br>\n";
} catch (JavaException $e) {
    echo "test failed3: {$e}\n";
    exit(3);
}
try {
    // must succeed
    echo $ar->map(array(1, 2, 3));
    echo "<br>\n";
} catch (JavaException $e) {
    echo "test failed4: {$e}\n";
    exit(4);
}
try {
    // must succeed
    echo $ar->list(array(1, 2, 3));
    echo "<br>\n";
} catch (JavaException $e) {
    echo "test failed5: {$e}\n";
    exit(5);
}
try {
    // must succeed