No, they do not have to pay you for your court appearance: you are retired, so this is not working time (for which you'd have to be paid), and a witnessed who testifies either voluntarily or under a subpoena is not entitled to compensation from their former employer.