public void testShortRead() throws Exception { PublicKey publicKey = new PublicKey(); ByteArrayInputStream in = new ByteArrayInputStream(DataHelper.getASCII("six times nine equals forty-two")); boolean error = false; try { publicKey.readBytes(in); } catch (DataFormatException dfe) { error = true; } assertTrue(error); }