Implement serialization iniside classes in Protocol name space and add separated test for Protocol's classes.