Add a test for bytesWritten proxy.