test: fix Encoder tests after recent ref API change