CacheBase implements ApplicationContextAware, InitializingBean { protected SerializationType getSerializationType(final Method method) { Serialization serialization = method.getAnnotation(Serialization.class); if (serialization != null) { return serialization.value(); } serialization = method.getDeclaringClass().getAnnotation(Serialization.class); if (serialization != null) { return serialization.value(); } return null; }  @Override void afterPropertiesSet(); @Override void setApplicationContext(final ApplicationContext applicationContext); void setCacheKeyBuilder(final CacheKeyBuilder cacheKeyBuilder); CacheKeyBuilder getCacheKeyBuilder(); BridgeMethodMappingStore getBridgeMethodMappingStore(); void setBridgeMethodMappingStore(final BridgeMethodMappingStore bridgeMethodMappingStore); Cache getCache(final AnnotationData data); boolean isCacheDisabled(); Method getMethodToCache(final JoinPoint jp, final Class<T> annotationClass); @SuppressWarnings("unchecked") T getUpdateData(final AnnotationData data, final Method method, final Object[] args, final Object returnValue); static final String DISABLE_CACHE_PROPERTY; }
@Test public void getSerializationType() throws Exception { Method method = null; SerializationType serializationType = null; method = SerializationTypeTestObject.class.getMethod("methodA", (Class<?>[]) null); serializationType = cut.getSerializationType(method); assertEquals(SerializationType.JAVA, serializationType); method = SerializationTypeTestObject.class.getMethod("methodB", (Class<?>[]) null); serializationType = cut.getSerializationType(method); assertEquals(SerializationType.JSON, serializationType); }