@Test
public void testBlockRead() {

	UnsyncByteArrayInputStream unsyncByteArrayInputStream =
		new UnsyncByteArrayInputStream(_BUFFER);
	int size = _SIZE * 2 / 3;
	byte[] buffer = new byte[size];
	int read = unsyncByteArrayInputStream.read(buffer);
	Assert.assertEquals(size, read);
	for (int i = 0; i < read; i++) {
		Assert.assertEquals(i, buffer[i]);
	}
	read = unsyncByteArrayInputStream.read(buffer);
	Assert.assertEquals(_SIZE - size, read);
	for (int i = 0; i < read; i++) {
		Assert.assertEquals(i + size, buffer[i]);
	}
	// Empty stream
	unsyncByteArrayInputStream = new UnsyncByteArrayInputStream(
		new byte[0]);
	Assert.assertEquals(-1, unsyncByteArrayInputStream.read(buffer));
}