@Test public void testMethodWithDefaultInterceptorsExcluded() throws Exception { ThirdSLSBeanLocal bean = (ThirdSLSBeanLocal) initCtx.lookup("ThirdSLSBeanLocal"); assert bean != null; List<String> expected = new ArrayList<String>(); expected.add("ClassLevelInterceptorOne"); expected.add("ClassLevelInterceptorTwo"); expected.add("MethodLevelInterceptorOne"); expected.add("MethodLevelInterceptorTwo"); expected.add("ThirdSLSBean"); expected.add("businessMethod"); List<String> actual = bean.businessMethod(); assert expected.equals(actual) : "Expected " + expected + ", but got " + actual; }
@Interceptors({MethodLevelInterceptorOne.class, MethodLevelInterceptorTwo.class}) public List<String> businessMethod() { List<String> list = new ArrayList<String>(); list.add("businessMethod"); return list; }
ThirdSLSBean implements ThirdSLSBeanLocal { @Interceptors({MethodLevelInterceptorOne.class, MethodLevelInterceptorTwo.class}) public List<String> businessMethod() { List<String> list = new ArrayList<String>(); list.add("businessMethod"); return list; } }
ThirdSLSBean implements ThirdSLSBeanLocal { @Interceptors({MethodLevelInterceptorOne.class, MethodLevelInterceptorTwo.class}) public List<String> businessMethod() { List<String> list = new ArrayList<String>(); list.add("businessMethod"); return list; }  }
ThirdSLSBean implements ThirdSLSBeanLocal { @Interceptors({MethodLevelInterceptorOne.class, MethodLevelInterceptorTwo.class}) public List<String> businessMethod() { List<String> list = new ArrayList<String>(); list.add("businessMethod"); return list; }  @Interceptors({MethodLevelInterceptorOne.class, MethodLevelInterceptorTwo.class}) List<String> businessMethod(); @Interceptors({MethodLevelInterceptorOne.class, MethodLevelInterceptorTwo.class}) @ExcludeClassInterceptors List<String> anotherBusinessMethod(); }
ThirdSLSBean implements ThirdSLSBeanLocal { @Interceptors({MethodLevelInterceptorOne.class, MethodLevelInterceptorTwo.class}) public List<String> businessMethod() { List<String> list = new ArrayList<String>(); list.add("businessMethod"); return list; }  @Interceptors({MethodLevelInterceptorOne.class, MethodLevelInterceptorTwo.class}) List<String> businessMethod(); @Interceptors({MethodLevelInterceptorOne.class, MethodLevelInterceptorTwo.class}) @ExcludeClassInterceptors List<String> anotherBusinessMethod();  }