protected void createMockPublication(String pubId, String area, String proxyUrl)
throws PublicationException, ServiceException, Exception {
if (!existsPublication(pubId)) {
Publication defaultPub = getPublication("default");
Instantiator instantiator = null;
ServiceSelector selector = null;
try {
selector = (ServiceSelector) getManager().lookup(Instantiator.ROLE + "Selector");
instantiator = (Instantiator) selector.select(defaultPub.getInstantiatorHint());
instantiator.instantiate(defaultPub, pubId, "Mock");
configureProxy(area, proxyUrl);
} finally {
if (selector != null) {
if (instantiator != null) {
selector.release(instantiator);