SimpleXMLEventFactory extends XMLEventFactory { @Override public Characters createCharacters(String content) { return new SimpleXMLEventAllocator.CharactersEvent(XMLStreamConstants.CHARACTERS, location, content, false); } SimpleXMLEventFactory();  SimpleXMLEventFactory(Location location); @Override void setLocation(Location location); @Override Attribute createAttribute(String prefix, String namespaceURI, String localName, String value); @Override Attribute createAttribute(String localName, String value); @Override Attribute createAttribute(QName name, String value); @Override Namespace createNamespace(String namespaceURI); @Override Namespace createNamespace(String prefix, String namespaceURI); @Override @SuppressWarnings({"rawtypes"}) StartElement createStartElement(QName name, Iterator attributes, Iterator namespaces); @Override StartElement createStartElement(String prefix, String namespaceUri, String localName); @Override @SuppressWarnings({"rawtypes"}) StartElement createStartElement(String prefix, String namespaceUri, String localName, Iterator attributes, Iterator namespaces); @Override @SuppressWarnings({"rawtypes"}) StartElement createStartElement(String prefix, String namespaceUri, String localName, Iterator attributes, Iterator namespaces, NamespaceContext context); @Override @SuppressWarnings({"rawtypes", "unchecked"}) EndElement createEndElement(QName name, Iterator namespaces); @Override EndElement createEndElement(String prefix, String namespaceUri, String localName); @Override @SuppressWarnings({"rawtypes"}) EndElement createEndElement(String prefix, String namespaceUri, String localName, Iterator namespaces); @Override Characters createCharacters(String content); @Override Characters createCData(String content); @Override Characters createSpace(String content); @Override Characters createIgnorableSpace(String content); @Override StartDocument createStartDocument(); @Override StartDocument createStartDocument(String encoding, String version, boolean standalone); @Override StartDocument createStartDocument(String encoding, String version); @Override StartDocument createStartDocument(String encoding); @Override EndDocument createEndDocument(); @Override EntityReference createEntityReference(String name, EntityDeclaration declaration); @Override Comment createComment(String text); @Override ProcessingInstruction createProcessingInstruction(String target, String data); @Override DTD createDTD(String dtd);  }
@Test public void testCreateCharacters() throws XMLStreamException { Characters event = factory.createCharacters("foobar"); verify(event, XMLStreamConstants.CHARACTERS, "foobar"); }