I think this is a bad idea to catch exception like this. From where is the exception we are asserting on coming?