}
}
@Test
public void test_JBESB_2108_03() throws ServiceNotFoundException, RegistryException {
InVMRegistryInterceptor reg = new InVMRegistryInterceptor();
try
{
EPR xy_z = new InVMEpr(new EPR(URI.create("x://123")));
EPR x_yz = new InVMEpr(new EPR(URI.create("x://1234")));
reg.setRegistry(new MockRegistry()) ;
// Register "xy:z"...
reg.registerEPR("xy", "z", "blah", xy_z, "blah");
Assert.assertEquals(xy_z, reg.findEPR("xy", "z"));
Assert.assertEquals("InVM EPR count", 1, InVMTransport.getInstance().findEPRs("xy", "z").size()) ;
Assert.assertEquals("InVM EPR count", 0, InVMTransport.getInstance().findEPRs("x", "yz").size()) ;
// Register "x:yz"...
reg.registerEPR("x", "yz", "blah", x_yz, "blah");
Assert.assertEquals(x_yz, reg.findEPR("x", "yz"));
Assert.assertEquals("InVM EPR count", 1, InVMTransport.getInstance().findEPRs("xy", "z").size()) ;
Assert.assertEquals("InVM EPR count", 1, InVMTransport.getInstance().findEPRs("x", "yz").size()) ;
// Unregister "xy:z"...
reg.unRegisterEPR("xy", "z", xy_z);
Assert.assertEquals("InVM EPR count", 0, InVMTransport.getInstance().findEPRs("xy", "z").size()) ;
Assert.assertEquals("InVM EPR count", 1, InVMTransport.getInstance().findEPRs("x", "yz").size()) ;
// Unregister "x:yz"...
reg.unRegisterEPR("x", "yz", x_yz);
Assert.assertEquals("InVM EPR count", 0, InVMTransport.getInstance().findEPRs("xy", "z").size()) ;
Assert.assertEquals("InVM EPR count", 0, InVMTransport.getInstance().findEPRs("x", "yz").size()) ;
}
finally
{