Hadith.3284 - And Al-Hasan ibn Mahbub narrated from Al-Alaa, from Muhammad ibn Muslim, from Abu Ja'far Imam Muhammad ibn Ali Al-Baqir عليه السلام: "The testimony of a Muslim slave is valid against a free Muslim."
The compiler of this book-may Allah سبحانه وتعالى have mercy on him-explained:
"This applies when the testimony is against someone other than the slave's master."