@Test public void valid() throws Throwable { Assume.assumeTrue(isValid); when(pjp.proceed()).thenReturn(expectedValue); advice.cacheUpdateAssign(pjp, expectedValue); verify(cache).set(eq(cacheKey), eq(EXPIRATION), eq(expectedValue), any(SerializationType.class)); }
@AfterReturning(pointcut = "updateAssign()", returning = "retVal") public void cacheUpdateAssign(final JoinPoint jp, final Object retVal) throws Throwable { update(jp, retVal); }
UpdateAssignCacheAdvice extends SingleUpdateCacheAdvice<UpdateAssignCache> { @AfterReturning(pointcut = "updateAssign()", returning = "retVal") public void cacheUpdateAssign(final JoinPoint jp, final Object retVal) throws Throwable { update(jp, retVal); } }
UpdateAssignCacheAdvice extends SingleUpdateCacheAdvice<UpdateAssignCache> { @AfterReturning(pointcut = "updateAssign()", returning = "retVal") public void cacheUpdateAssign(final JoinPoint jp, final Object retVal) throws Throwable { update(jp, retVal); } UpdateAssignCacheAdvice(); }
UpdateAssignCacheAdvice extends SingleUpdateCacheAdvice<UpdateAssignCache> { @AfterReturning(pointcut = "updateAssign()", returning = "retVal") public void cacheUpdateAssign(final JoinPoint jp, final Object retVal) throws Throwable { update(jp, retVal); } UpdateAssignCacheAdvice(); @Pointcut("@annotation(com.google.code.ssm.api.UpdateAssignCache)") void updateAssign(); @AfterReturning(pointcut = "updateAssign()", returning = "retVal") void cacheUpdateAssign(final JoinPoint jp, final Object retVal); }
UpdateAssignCacheAdvice extends SingleUpdateCacheAdvice<UpdateAssignCache> { @AfterReturning(pointcut = "updateAssign()", returning = "retVal") public void cacheUpdateAssign(final JoinPoint jp, final Object retVal) throws Throwable { update(jp, retVal); } UpdateAssignCacheAdvice(); @Pointcut("@annotation(com.google.code.ssm.api.UpdateAssignCache)") void updateAssign(); @AfterReturning(pointcut = "updateAssign()", returning = "retVal") void cacheUpdateAssign(final JoinPoint jp, final Object retVal);  }