private Optional<String> findImage(final String baseDir, final String fileName) {
   try {
     getFile(baseDir + fileName);
     return Optional.of(fileName);
   } catch (AssertionError e) {
     return Optional.absent();
   }
 }
  @Test(expected = IllegalFileAccessException.class)
  public void testGeoIllegalFileUrl() throws Exception {
    final File file =
        AbstractMapfishSpringTest.getFile(
            CreateMapProcessorFlexibleScaleAndCenterGeoTiffTest.class,
            CreateMapProcessorFlexibleScaleAndCenterGeoTiffTest.BASE_DIR + "sampleGeoTiff.tif");
    final Configuration configuration = new Configuration();
    configuration.setConfigurationFile(File.createTempFile("xyz", ".yaml"));

    Template template = new Template();
    template.setConfiguration(configuration);

    GeotiffLayer.GeotiffParam param = new GeotiffLayer.GeotiffParam();
    param.url = file.toURI().toURL().toString();
    new GeotiffLayer.Plugin().parse(template, param);
  }