@Test public void testByteBatch() throws SQLException { byte[] bytes = new byte[256]; int sum = 0; for (int i = 0; i < 256; ++i) { bytes[i] = (byte) (i & 0xff); sum += bytes[i]; } assertEquals(-128, sum); for (int offset = 0; offset < 256; ++offset) { testGetByte(bytes, offset, PBinary.INSTANCE, bytes[offset]); testGetByte(bytes, offset, PVarbinary.INSTANCE, bytes[offset]); } for (int offset = 0; offset < 256; ++offset) for (int tmp = Byte.MIN_VALUE; tmp <= Byte.MAX_VALUE; ++tmp) { byte[] expected = new byte[bytes.length]; System.arraycopy(bytes, 0, expected, 0, bytes.length); expected[offset] = (byte) (tmp & 0xff); testSetByte(bytes, offset, tmp, PBinary.INSTANCE, expected); } }