8990919293949596979899
assertEquals("nobody", bean.whoAmI()); try { bean.onlyAdmin(); fail("Should have thrown EJBAccessException"); } catch(EJBAccessException e) { // good
108109110111112113114115116117118
login("Admin", null); String me = bean.whoAmI(); assertEquals("Admin", me); bean.onlyAdmin(); } @Test public void testEquals() throws Exception {
168169170171172173174175176177178
bean.permitAll(); try { bean.onlyAdmin(); fail("Should have thrown EJBAccessException"); } catch(EJBAccessException e) { // good