Qitzur Shulchan Arukh – 181:12
Anyone who knows testimony for his friend and is capable of giving that testimony, and his friend has a purpose in his testimony and calls upon him that he testify for him before the court, is obligated to testify. Whether there is another witness with him, whether he is alone. And if he suppresses his testimony, he is accountable by the laws [ie penal system] of heaven.
It is prohibited for a person to testify about something that he doesn’t know even if he was told it by someone who he knows that he never lies. Even if the claimant tells him, come and stand with this one witness that I have and don’t testify, just that my debtor shall worry and figure that I have two witnesses and therefore agree to me [ie my claim], don’t listen to him, for it says “stay distant from things of falsehood.”