Testing the training method.