final DefaultConfiguration configuration = new DefaultConfiguration( "element", "", "" );
final String name = "key";
final String value = "value";
configuration.setAttribute( name, value );
final SAXConfigurationSerializer serializer = new SAXConfigurationSerializer();
final AttributesImpl attributes = serializer.serializeAttributes( configuration );
assertEquals( "attributes.getLength()", 1, attributes.getLength() );
assertEquals( "attributes.getLocalName(0)", name, attributes.getLocalName( 0 ) );
assertEquals( "attributes.getQName(0)", name, attributes.getQName( 0 ) );
assertEquals( "attributes.getURI(0)", "", attributes.getURI( 0 ) );
assertEquals( "attributes.getType(0)", "CDATA", attributes.getType( 0 ) );
assertEquals( "attributes.getType(0)", value, attributes.getValue( 0 ) );
}