public void testDefaultRefreshCheckDelay() throws Exception {
ApplicationContext context = new ClassPathXmlApplicationContext(CONFIG);
Advised advised = (Advised) context.getBean("testBean");
AbstractRefreshableTargetSource targetSource =
((AbstractRefreshableTargetSource) advised.getTargetSource());
Field field = AbstractRefreshableTargetSource.class.getDeclaredField("refreshCheckDelay");
field.setAccessible(true);
long delay = ((Long) field.get(targetSource)).longValue();
assertEquals(5000L, delay);