Don't use magic numbers.

Change-Id: I4d22dea28c633d431ebbeb3ecbea74f7d33c7ad4
Fixed deserialize test.

Test against long/int values not against a byte array.

Change-Id: I68e166006dd0e095438a211d02e1874789d10d98