Add tests for writer
Remove unused Builder annotation
Added test case for collections