Finish test case for write().