try
{
Object obj = getInitialContext().lookup("test/jca/TestInterface");
assertTrue("Instanceof TestInterface", obj instanceof TestInterface);
assertTrue("Instanceof TestImplementation", obj instanceof TestImplementation);
TestImplementation impl = (TestImplementation) obj;
assertEquals("StringValue", impl.getStringProperty());
assertEquals(new Integer(123), impl.getIntegerProperty());
obj = getInitialContext().lookup("test/jca/TestInterface2");
assertTrue("Instanceof TestInterface2", obj instanceof TestInterface2);
assertTrue("Instanceof TestImplementation2", obj instanceof TestImplementation2);
TestImplementation2 impl2 = (TestImplementation2) obj;