Trump called the moment a "great test" for NATO and said the alliance made "a very foolish mistake" by rejecting him.