Add serialization test for classification machine