Test added for write-function.