New class and test added for CharArrayWriter