@Test
    void testGetImageInfo_missingWidthValue() {
        final byte[] bytes = "P7\nWIDTH \n".getBytes(US_ASCII);
        final PnmImagingParameters params = new PnmImagingParameters();
        final PnmImageParser underTest = new PnmImageParser();
        assertThrows(ImagingException.class, () -> underTest.getImageInfo(bytes, params));
    }
If an invalid width is specified, should throw {@link ImagingException} rather than {@link NumberFormatException}.
src/test/java/org/apache/commons/imaging/formats/pnm/PnmImageParserTest.java