Add test for exception when dummy encoding is passed