Added serialization of object with primitive array and test for it.