@Test
    void testPngWithInvalidPngChunkSize() {
        final File imageFile = TestResources.resourceToFile("/IMAGING-211/testfile_2.png");
        final PngImagingParameters params = new PngImagingParameters();
        params.setBufferedImageFactory(new ManagedImageBufferedImageFactory());
        final PngImageParser jpegImageParser = new PngImageParser();
        assertThrows(ImagingException.class, () -> jpegImageParser.getBufferedImage(imageFile, params));
    }
Test that an image with an invalid PNG chunk size causes an ImageReadException instead of other exception types.
src/test/java/org/apache/commons/imaging/formats/png/PngWithInvalidPngChunkSizeTest.java