added tests for encoder. all primitive data types should work. mongo data types can't encode keys.