Facelet at = f.getFacelet("convertNumber.xml");
UIViewRoot root = faces.getViewRoot();
at.apply(faces, root);
UIOutput out1 = (UIOutput) root.findComponent("out1");
UIOutput out2 = (UIOutput) root.findComponent("out2");
UIOutput out3 = (UIOutput) root.findComponent("out3");
UIOutput out4 = (UIOutput) root.findComponent("out4");
UIOutput out5 = (UIOutput) root.findComponent("out5");
assertNotNull("out1", out1);
assertNotNull("out2", out2);
assertNotNull("out3", out3);
assertNotNull("out4", out4);
assertNotNull("out5", out5);
assertNotNull("out1 converter", out1.getConverter());
assertNotNull("out2 converter", out2.getConverter());
assertNotNull("out3 converter", out3.getConverter());
assertNotNull("out4 converter", out4.getConverter());
assertNotNull("out5 converter", out5.getConverter());
assertEquals("out1 value", "12", out1.getConverter().getAsString(
faces, out1, new Double(12.001)));
assertEquals("out2 value", "$12.00", out2.getConverter()
.getAsString(faces, out2, new Double(12.00)));
assertEquals("out3 value", "00,032", out3.getConverter()
.getAsString(faces, out3, new Double(32)));
assertEquals("out4 value", "0.67", out4.getConverter()
.getAsString(faces, out4, new Double(2.0/3.0)));
assertEquals("out5 value", "67%", out5.getConverter()
.getAsString(faces, out5, new Double(0.67)));
}