support to deal with System.exit(0) in junit