reg.findEPR("x", "y");
fail("Expected ServiceNotFoundException") ;
} catch (final ServiceNotFoundException snfe) {
}
reg.registerEPR("x", "y", "blah", new InVMEpr(new EPR(URI.create("x://123"))), "blah");
assertEquals(1, reg.findEPRs("x", "y").size());
assertEquals("x://123", reg.findEPR("x", "y").getAddr().getAddress());
reg.registerEPR("x", "y", "blah", new InVMEpr(new EPR(URI.create("x://123"))), "blah");
assertEquals(2, reg.findEPRs("x", "y").size());
reg.registerEPR("a", "z", "blah", new InVMEpr(new EPR(URI.create("x://12345"))), "blah");
assertEquals(2, reg.findEPRs("x", "y").size());
assertEquals(1, reg.findEPRs("a", "z").size());
assertEquals(2, reg.findAllServices().size());
assertEquals(1, reg.findServices("x").size());
// unreg using a valid service + registred EPR... make sure EPR is removed...
reg.unRegisterEPR("a", "z", new InVMEpr(new EPR(URI.create("x://12345"))));
assertEquals(0, reg.findEPRs("a", "z").size());
// unreg all for the service
assertEquals(2, reg.findEPRs("x", "y").size());
reg.unRegisterService("x", "y");