"And on the Day of Resurrection, he will be a witness against them." This means: he will testify against them that he has conveyed the message of his Lord and affirmed his own servitude [to Allah]. [Verses 160-162]
﴿وَيَوْمَ الْقِيَامَةِ يَكُونُ عَلَيْهِمْ شَهِيدًا﴾ أَي: يشْهد عَلَيْهِم؛ أَنَّهُ قد بلغ رِسَالَة ربه، وَأقر بالعبودية على نَفسه. [آيَة ١٦٠ - ١٦٢]