A disappointing winless run showed Newcastle what it takes to be competitive in the Champions League.