public function testAddRoot()
 {
     $this->repo->add('/', new TestDirectory('/', array(new TestDirectory('/webmozart', array(new TestFile('/webmozart/file'))))));
     $root = $this->repo->get('/');
     $dir = $this->repo->get('/webmozart');
     $file = $this->repo->get('/webmozart/file');
     $this->assertInstanceOf('Puli\\Repository\\Api\\Resource\\Resource', $root);
     $this->assertSame('/', $root->getPath());
     $this->assertSame($this->repo, $root->getRepository());
     $this->assertCount(1, $root->listChildren());
     $this->assertInstanceOf('Puli\\Repository\\Api\\Resource\\Resource', $dir);
     $this->assertSame('/webmozart', $dir->getPath());
     $this->assertSame($this->repo, $dir->getRepository());
     $this->assertCount(1, $dir->listChildren());
     $this->assertInstanceOf('Puli\\Repository\\Api\\Resource\\BodyResource', $file);
     $this->assertSame('/webmozart/file', $file->getPath());
     $this->assertSame($this->repo, $file->getRepository());
     $this->assertSame(TestFile::BODY, $file->getBody());
 }