Codec for testing that asserts various contracts of the codec apis.