147148149150151152153154155156157
assertEquals("myname", proxy.getName()); assertEquals(50, proxy.getAge()); try { proxy.exceptional(new IllegalStateException()); fail("Should have thrown IllegalStateException"); } catch (IllegalStateException ex) { // expected }
154155156157158159160161162163164
} catch (IllegalStateException ex) { // expected } try { proxy.exceptional(new IllegalAccessException()); fail("Should have thrown IllegalAccessException"); } catch (IllegalAccessException ex) { // expected }
7576777879808182838485
8283848586878889909192