Adding the writer class and write class test case