Update tests

* Fix incorrect error messages
* Add a test for an InputStream of an image with no text
Add support for BufferedImage