fixed unit-test to properly detect if decode worked