ctx.setProperty("host.pattern", "static.host.com");
StaticReferenceRewriteTransformerFactory factory = new StaticReferenceRewriteTransformerFactory();
factory.activate(ctx);
Transformer transformer = factory.createTransformer();
transformer.setContentHandler(handler);
AttributesImpl in = new AttributesImpl();
in.addAttribute(null, "href", null, "CDATA", "/etc/clientlib/test.css");
in.addAttribute(null, "class", null, "CDATA", "something nostatic");
transformer.startElement(null, "link", null, in);
verify(handler, only()).startElement(isNull(String.class), eq("link"), isNull(String.class),
attributesCaptor.capture());
Attributes out = attributesCaptor.getValue();
assertEquals("/etc/clientlib/test.css", out.getValue(0));