public function testSerializationToJson()
 {
     $definition = new Definition();
     $definition->setType('LOCAL');
     $definition->setPath('/path/to/filesystem');
     $definition->setProperties(array('create' => true, 'mode' => 0755));
     $data = $this->serializer->serialize($definition, 'json');
     $object = $this->serializer->deserialize($data, 'Abc\\Filesystem\\Definition', 'json');
     $this->assertEquals($definition, $object);
     $this->assertSame($definition->getProperties(), $object->getProperties());
 }
 private function createDefinition($type, $path, array $options = array())
 {
     $definition = new Definition();
     $definition->setType($type);
     $definition->setPath($path);
     $definition->setProperties($options);
     return $definition;
 }