### Question:
CorbaStreamWriter implements XMLStreamWriter { public void writeCharacters(java.lang.String text) throws XMLStreamException { currentTypeListener.processCharacters(text); } CorbaStreamWriter(ORB orbRef,
                             CorbaTypeMap map,
                             ServiceInfo sinfo);  CorbaStreamWriter(ORB orbRef,
                             List<ArgType> paramTypes,
                             CorbaTypeMap map,
                             ServiceInfo sinfo,
                             boolean wrap); CorbaObjectHandler[] getCorbaObjects(); void writeStartElement(String namespaceURI, String localName); void writeEndElement(); void writeStartElement(java.lang.String localName); void writeStartElement(java.lang.String prefix,
                                  java.lang.String localName,
                                  java.lang.String namespaceURI); void writeEmptyElement(java.lang.String namespaceURI,
                                  java.lang.String localName); void writeEmptyElement(java.lang.String prefix,
                                  java.lang.String localName,
                                  java.lang.String namespaceURI); void writeEmptyElement(java.lang.String localName); void writeEndDocument(); void close(); void flush(); void writeAttribute(java.lang.String localName,
                               java.lang.String value); void writeAttribute(java.lang.String prefix,
                               java.lang.String namespaceURI,
                               java.lang.String localName,
                               java.lang.String value); void writeAttribute(java.lang.String namespaceURI,
                               java.lang.String localName,
                               java.lang.String value); void writeNamespace(java.lang.String prefix,
                               java.lang.String namespaceURI); void writeDefaultNamespace(java.lang.String namespaceURI); void writeComment(java.lang.String data); void writeProcessingInstruction(java.lang.String target); void writeProcessingInstruction(java.lang.String target,
                                           java.lang.String data); void writeCData(java.lang.String data); void writeDTD(java.lang.String dtd); void writeEntityRef(java.lang.String name); void writeStartDocument(); void writeStartDocument(java.lang.String encoding,
                                   java.lang.String version); void writeStartDocument(java.lang.String version); void writeCharacters(java.lang.String text); void writeCharacters(char[] text,
                                int start,
                                int len); java.lang.String getPrefix(java.lang.String uri); void setPrefix(java.lang.String prefix,
                          java.lang.String uri); void setDefaultNamespace(java.lang.String uri); void setNamespaceContext(NamespaceContext context); NamespaceContext getNamespaceContext(); java.lang.Object getProperty(java.lang.String name);  }### Answer:
@Test public void writeCharactersTest() throws XMLStreamException { CorbaStreamWriter writer = new CorbaStreamWriter(null, null, null); final String[] pointer = new String[1]; writer.currentTypeListener = new AbstractCorbaTypeListener(null) { @Override public void processCharacters(String text) { pointer[0] = text; } }; writer.writeCharacters("abcdefghijklmnopqrstuvwxyz".toCharArray(), 0, 4); assertEquals("abcd", pointer[0]); }