Srimad Bhagavatam Canto 01, Chapter 07, Text 40

SB 1.7.40

suta uvaca
evam pariksata dharmam
parthah krsnena coditah
naicchad dhantum guru-sutam
yadyapy atma-hanam mahan
 
Translation by His Divine Grace A. C. Bhaktivedanta Swami Srila Prabhupada: 
 
Suta Gosvami said: Although Krsna, who was examining Arjuna in religion, encouraged Arjuna to kill the son of Dronacarya, Arjuna, a great soul, did not like the idea of killing him, although Asvatthama was a heinous murderer of Arjuna’s family members.
 
Purpor tby His Divine Grace A. C. Bhaktivedanta Swami Srila Prabhupada: 
 
Arjuna was a great soul undoubtedly, which is proved here also. He is encouraged herein personally by the Lord to kill the son of Drona, but Arjuna considers that the son of his great teacher should be spared, for he happens to be the son of Dronacarya, even though he is an unworthy son, having done all sorts of heinous acts whimsically for no one’s benefit.
 
Lord Sri Krsna encouraged Arjuna outwardly just to test Arjuna’s sense of duty. It is not that Arjuna was incomplete in the sense of his duty, nor was Lord Sri Krsna unaware of Arjuna’s sense of duty. But Lord Sri Krsna puts to the test many of His pure devotees just to magnify the sense of duty. The gopis were put to such tests as well. Prahlada Maharaja also was put to such a test. All pure devotees come out successful in the respective tests by the Lord.
Srimad Bhagavatam Canto 01, Chapter 07, Text 39
Srimad Bhagavatam Canto 01, Chapter 07, Text 41