A professional cage fighter accused of murdering his best friend threatened to kill his then-pregnant girlfriend, a Sydney jury has heard.