Автор: Fabio B. Silva (fabio.bat.silva@gmail.com)
 public function testAddAndFindByFieldNumber()
 {
     $registry = new ExtensionRegistry();
     $extension = new ExtensionField(Animal::CLASS, 'animal', 100, function () {
     }, function () {
     }, function () {
     });
     $this->assertNull($registry->findByNumber(Animal::CLASS, 100));
     $registry->add($extension);
     $this->assertSame($extension, $registry->findByNumber(Animal::CLASS, 100));
     $registry->clear();
     $this->assertNull($registry->findByNumber(Animal::CLASS, 100));
 }
 /**
  * Register all extensions
  *
  * @param \Protobuf\Extension\ExtensionRegistry
  */
 public static function registerAllExtensions(\Protobuf\Extension\ExtensionRegistry $registry)
 {
     $registry->add(self::package());
     $registry->add(self::genericServices());
 }