tests for decode