Added test code for bail out.

Added test code for bail out.