Adds test to catch exception.