JsTopicInterceptor implements Serializable { JsTopicName getJsTopicNameAnnotation(Annotation[] parameterAnnotations) { for (Annotation parameterAnnotation : parameterAnnotations) { if (parameterAnnotation.annotationType().equals(JsTopicName.class)) { return (JsTopicName) parameterAnnotation; } } return null; }  @AroundInvoke Object processJsTopic(InvocationContext ctx);  }
@Test public void testGetJsTopicNameAnnotation() throws Exception { System.out.println("getJsTopicNameAnnotation"); JsTopicName jtn = new JsTopicNameImpl("", ""); Annotation[] parameterAnnotations = new Annotation[] {jtn}; JsTopicName result = instance.getJsTopicNameAnnotation(parameterAnnotations); assertThat(result).isEqualTo(jtn); parameterAnnotations = new Annotation[] {INJECT_AT, jtn, ANY_AT}; result = instance.getJsTopicNameAnnotation(parameterAnnotations); assertThat(result).isEqualTo(jtn); parameterAnnotations = new Annotation[] {INJECT_AT, ANY_AT}; result = instance.getJsTopicNameAnnotation(parameterAnnotations); assertThat(result).isNull(); }