Add test for writer