please use the style suggested here: http://stackoverflow.com/questions/5912240/android-junit-testing-how-to-expect-an-exception