Dog kennel debate goes to court