wsCtrl.expectAndReturn(ws.getNamespaceRegistry(), registry);
// registry record
String[] prefixes = new String[] { foo };
String oldURI = "old bar";
nrCtrl.expectAndReturn(registry.getPrefixes(), prefixes);
nrCtrl.expectAndReturn(registry.getURI(foo), oldURI);
registry.unregisterNamespace(foo);
registry.registerNamespace(foo, "bar");
registry.registerNamespace("hocus", "pocus");