adding tests for on-the-fly encoder