add new tests for writer factory