/**
  * @param string $filename
  *
  * @return FileReader\FileReader
  */
 private function getReaderFor($filename)
 {
     if (!$this->readerFactory) {
         $this->readerFactory = new FileReader\ReaderFactory($this->fileReaders);
     }
     return $this->readerFactory->create($filename);
 }
 public function testItThrowsIfThereIsNoRegisteredReaderForGivenFileType()
 {
     $this->createTestFile('test.unknown');
     $this->expectException(UnknownFileTypeException::class);
     $this->factory->create($this->getTestPath('test.unknown'));
 }