Fred Sanford testifies in court