TestCase: added setExpectedException method