Added test for serialisation functions in utils.