QualifierCacheTests.java 文件源码

java
阅读 38 收藏 0 点赞 0 评论 0

项目:Spork 作者:
@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));
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号