serialization: add tests

Resolves openbmc/openbmc#1684.

Change-Id: Ia554147001e51b05fe8692ae0b39e3efaf481130
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
4 files changed