Added MockStreamwriter tests