Added encoded/decoded tests.