[WFLY-456][WFLY-2041] Fix tests when assertions are enabled