input.getAttributes().put("Attribute", "testValue1");
input.getAttributes().put("MoreAttribute", "testValue2");
//ResponseWriter responseWriter = facesContext.getResponseWriter();
StringWriter stringWriter = new StringWriter();
MockResponseWriter responseWriter = new MockResponseWriter(stringWriter, "text/html", "UTF8");
facesContext.setResponseWriter(responseWriter);
responseWriter.startDocument();
responseWriter.startElement("span", input);
compositeRenderer.encodeAttributeParameters(facesContext, input);
responseWriter.endElement("span");
responseWriter.endDocument();
responseWriter.flush();
String result = stringWriter.getBuffer().toString();
assertTrue(result.contains("testAttribute=\"testValue1\""));
assertTrue(result.contains("testMoreAttribute=\"testValue2\""));
}