Jabir (RA) reported that the wife of Bashir said (to her husband): Give to my son your slave as a gift, and make for me Allah's Messenger (ﷺ) a witness He came to Allah's Messenger (ﷺ) and said: The daughter of so and so (his wife Amra bint Rawaha) asked me to give my slave as a gift to her son, and call for me Allah's Messenger (ﷺ) as a witness. Thereupon he (the Holy Prophet) said: Has he (Nu'man) brothers? He (Bashir) said: Yes. He (further) said: Have you given to all others as you have given to him? He said: No. He said: Then it is not fair; and verily I cannot bear witness but only to what is just.
Narrated Jabir: Bashir's wife said (to her husband): Give my son your slave, and call the Messenger of Allah ﷺ as witness for me. So he came to the Messenger of Allah ﷺ and said: The daughter of so-and-so has asked me to give her som my slave and said to me: Call the Messenger of Allah ﷺ as witness for her. He asked: Has he brothers? He replied: Yes. He again asked: Has he given them all the same as you have given him? He replied: No. He said: This is not good, and I will be a witness to what it right.
Shaykh Umar Farooq Saeedi
Benefits and Issues: Benefit. It is recommended (mustahabb) to appoint witnesses in important matters. And testimony should always be given upon truth and justice; to become a witness in a matter of oppression is also impermissible and forbidden (haram).
Source: Sunan Abu Dawood – Commentary by Shaykh Umar Farooq Saeedi, Page: 3545