added tests to ensure getContent() responds correctly for StringBuilders and different encodings