refactor decode test cases