Call the attorney that subpoenaed you. Let him/her know the situation and that you really don't want to be placed in the middle of anything. If your friend insists on calling you at trial, ask the attorney if a Motion for Telephonic Appearance can be filed so that you only have to testify by phone. Both your friend and the attorney should be very understanding about the situation and make every accommodation possible to make your involvement as seamless as possible. If you're still not comfortable, I know that I would likely NOT call you as a witness. The last person I want to call as a witness in any case is someone who is hostile to being called as one because you never know what the testimony is going to be when someone is upset at you.
If you get nowhere with the attorney and your friend, do some research on how to quash a subpoena in your jurisdiction? Here in AZ, we'd call the pleading that you would file a "Motion to Quash Subpoena".
Sign up to receive a 10-part series of useful information and legal advice about the divorce process.