In case anyone is wondering, that code should read something like:
void testFooBarException() {
try {
thisShouldThrowFooBarException()
fail() // Should have thrown exception
} catch (FooBarException ignored) {}
}
If you're feeling super fancy, you can even do some asserts in the catch block to make sure the FooBarException has an expected exception message.