Github user onealj commented on a diff in the pull request: https://github.com/apache/commons-imaging/pull/27#discussion_r127633025 --- Diff: src/test/java/org/apache/commons/imaging/formats/pnm/PbmFileInfoTest.java --- @@ -0,0 +1,41 @@ +package org.apache.commons.imaging.formats.pnm; + +import org.junit.Test; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; + +/** + * Unit tests for class {@link PbmFileInfo}. + * + * @date 13.07.2017 + * @see PbmFileInfo + * + **/ +public class PbmFileInfoTest{ + + + @Test + public void testGetRGBThrowsIOException() throws IOException { + + PbmFileInfo pbmFileInfo = new PbmFileInfo(2764, 354, true); + byte[] byteArray = new byte[2]; + ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(byteArray); --- End diff -- InputStream is = new ByteArrayInputStream(new byte[2]); The rest of this method doesn't care what the InputStream implementation is.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org