Package com.m3.methodcache.interceptor

Examples of com.m3.methodcache.interceptor.MemcachedCacheResultInterceptor.invoke()


  public void invoke_A$MethodInvocation() throws Throwable {
    MemcachedCacheResultInterceptor interceptor = new MemcachedCacheResultInterceptor();
    MethodInvocation invocation = mock(MethodInvocation.class);
        when(invocation.getMethod()).thenReturn(Foo.class.getDeclaredMethod("doSomething"));
        when(invocation.proceed()).thenReturn("foo");
    Object result = interceptor.invoke(invocation);
    Object expected = "foo";
    assertThat(result, is(equalTo(expected)));
  }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.