Throw an exception when the unserialize() is not available and an internal class is to be mocked
Merge branch '2.0' into 2.1