ISPN-2867 Do not test Main to avoid System.exit() affecting test completion

master and 5.2.x