- added testcases for writer