XD-790 - Fixed System.exit() test issue