Throw an exception when the unserialize() is not available and an internal class is to be mocked