A court was told a man urinated into a jug, mixed it with coffee, and then had thrown it over his ex-partner's head.