public function testSleep()
{
// removed className, because it is set by constructor
$fields = array('boost', 'index', 'numberOfReplicas', 'numberOfShards', 'parent', 'timeToLive', 'type', 'value');
//fill the metadata fields
foreach ($fields as $field) {
$this->classMetadata->{$field} = 1;
}
$this->classMetadata->fieldMappings = array();
$serializedClass = serialize($this->classMetadata);
$unserializedClass = unserialize($serializedClass);
$unserializedClass->wakeupReflection($this->reflectionService);
$this->assertEquals($unserializedClass, $this->classMetadata);
}