add tests for strict decode and encode