added test for text encoder