encoding version in unit test, decoding in detection