@Test
public void testSetPosition() throws Exception {

	Assert.assertEquals(data.length, stream.available());
	Assert.assertEquals('0', stream.read());
	stream.setPosition(1);
	Assert.assertEquals(data.length - 1, stream.available());
	Assert.assertEquals('1', stream.read());
	stream.setPosition(3);
	Assert.assertEquals(data.length - 3, stream.available());
	Assert.assertEquals('3', stream.read());
	stream.setPosition(data.length);
	Assert.assertEquals(0, stream.available());
	Assert.assertEquals(-1, stream.read());
}