Updated the tests to use junit's expected exception feature