}
return null;
}
});
Support_Proxy_I1 proxy = (Support_Proxy_I1) p;
assertTrue("Failed identity test ", proxy.equals(proxy));
assertTrue("Failed not equals test ", !proxy.equals(""));
int[] result = (int[]) proxy.array(new long[] { 100L, -200L });
assertEquals("Failed base type conversion test ", -200, result[0]);
boolean worked = false;
try {
proxy.string("");
} catch (Support_Proxy_SubException e) {
worked = true;
} catch (Support_Proxy_ParentException e) { // is never thrown
}
assertTrue("Problem converting exception ", worked);
worked = false;
try {
proxy.string("clone");
} catch (Support_Proxy_ParentException e) { // is never thrown
} catch (UndeclaredThrowableException e) {
worked = true;
}
assertTrue("Problem converting exception ", worked);
worked = false;
try {
proxy.string("error");
} catch (Support_Proxy_ParentException e) { // is never thrown
} catch (UndeclaredThrowableException e) {
} catch (RuntimeException e) {
worked = e.getClass() == ArrayStoreException.class;
}
assertTrue("Problem converting exception ", worked);
worked = false;
try {
proxy.string("any");
} catch (Support_Proxy_ParentException e) { // is never thrown
} catch (UndeclaredThrowableException e) {
worked = true;
}
assertTrue("Problem converting exception ", worked);