@Test
    void testErrorDecompressingInvalidFile() {
        // From IMAGING-219
        final File inputFile = TestResources.resourceToFile("/IMAGING-219/timeout-9713502c9c371f1654b493650c16ab17c0444369.hdr");
        final ByteSource byteSourceFile = ByteSource.file(inputFile);
        final RgbeImagingParameters params = new RgbeImagingParameters();
        assertThrows(ImagingException.class, () -> new RgbeImageParser().getBufferedImage(byteSourceFile, params));
    }
Test that a bad file does not gets the RgbeImageParser stuck reading it.
src/test/java/org/apache/commons/imaging/formats/rgbe/RgbeReadTest.java