updating tests for setWriter