Tests for the translate function