@Test
public void testReadBlock() throws IOException {

	byte[] expectedBytes = new byte[1];
	AtomicBoolean readCalled = new AtomicBoolean();
	UnsyncFilterInputStream unsyncFilterInputStream =
		new UnsyncFilterInputStream(
			new TestInputStream() {
				@Override
				public int read(byte[] bytes, int offset, int length) {
					Assert.assertSame(expectedBytes, bytes);
					Assert.assertEquals(0, offset);
					Assert.assertSame(1, length);
					readCalled.set(true);
					return -1;
				}
			});
	Assert.assertEquals(-1, unsyncFilterInputStream.read(expectedBytes));
	Assert.assertTrue(readCalled.get());
}