@Test
public void testWriteBlock() throws IOException {

	byte[] expectedBytes = new byte[1];
	AtomicBoolean writeCalled = new AtomicBoolean();
	UnsyncFilterOutputStream unsyncFilterOutputStream =
		new UnsyncFilterOutputStream(
			new TestOutputStream() {
				@Override
				public void write(byte[] bytes, int offset, int length) {
					Assert.assertSame(expectedBytes, bytes);
					Assert.assertEquals(0, offset);
					Assert.assertEquals(1, length);
					writeCalled.set(true);
				}
			});
	unsyncFilterOutputStream.write(expectedBytes);
	Assert.assertTrue(writeCalled.get());
}