The case was heard at Elgin Sheriff Court