### Question:
BasicAttachmentProvider implements AttachmentProvider { @Override public InputStream getAttachmentData( final Attachment att ) throws IOException, ProviderException { final File attDir = findAttachmentDir( att ); try { final File f = findFile( attDir, att ); return new FileInputStream( f ); } catch( final FileNotFoundException e ) { log.error( "File not found: " + e.getMessage() ); throw new ProviderException( "No such page was found." ); } }  @Override void initialize( final Engine engine, final Properties properties ); @Override void putAttachmentData( final Attachment att, final InputStream data ); @Override String getProviderInfo(); @Override InputStream getAttachmentData( final Attachment att ); @Override List< Attachment > listAttachments( final Page page ); @Override Collection< Attachment > findAttachments( final QueryItem[] query ); @Override List< Attachment > listAllChanged( final Date timestamp ); @Override Attachment getAttachmentInfo( final Page page, final String name, int version ); @Override List< Attachment > getVersionHistory( final Attachment att ); @Override void deleteVersion( final Attachment att ); @Override void deleteAttachment( final Attachment att ); @Override void moveAttachmentsForPage( final String oldParent, final String newParent ); static final String PROP_DISABLECACHE; static final String PROPERTY_FILE; static final String DIR_EXTENSION; static final String ATTDIR_EXTENSION; }### Answer:
@Test public void testGetAttachmentDataRaisesProviderExceptionIfInexistentFileOnDisk() { final Attachment att = Wiki.contents().attachment( m_engine, NAME1, "test1.txt" ); Assertions.assertThrows( ProviderException.class, () -> m_provider.getAttachmentData( att ) ); }