/**
  * @test
  */
 public function testGetByHash()
 {
     $this->repository->expects($this->once())->method('getByHash')->with($this->equalTo(self::DUMMY_HASH))->will($this->returnValue($this->getDummyAttachment()));
     $this->file->expects($this->atLeastOnce())->method('getFilename')->will($this->returnValue(self::DUMMY_FILE_NAME));
     $attach = $this->service->getByHash(self::DUMMY_HASH);
     $this->assertEquals(self::DUMMY_HASH, $attach->getHash());
     $this->assertEquals(self::DUMMY_FILE_NAME, $attach->getFile()->getFilename());
 }