@Test
public void annotationWithValueMethod() {
Annotation annotation = Singleton.class.getAnnotation(Retention.class);
cache.getQualifier(annotation);
InOrder inOrder = inOrder(lock, cache);
// initial call
inOrder.verify(cache).getQualifier(annotation);
// internal thread safe method lookup
inOrder.verify(cache).getValueMethodThreadSafe(Retention.class);
inOrder.verify(lock).lock();
inOrder.verify(cache).getValueMethod(Retention.class);
inOrder.verify(lock).unlock();
// get Qualifier from value() method
inOrder.verify(cache).getQualifier(any(Method.class), eq(annotation));
inOrder.verifyNoMoreInteractions();
verifyZeroInteractions(cache);
assertThat(bindActionMap.size(), is(1));
}
QualifierCacheTests.java 文件源码
java
阅读 38
收藏 0
点赞 0
评论 0
项目:Spork
作者:
评论列表
文章目录