Add tests

I don't think you're using this `max_length` anywhere.