*/
public class ReproTests {
@Test
public void repro() throws InterruptedException {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
ctx.register(ReproConfig.class);
ctx.refresh();
Thread.sleep(10); // allow @Scheduled method to be called several times
MyRepository repository = ctx.getBean(MyRepository.class);
assertThat("repository is not a proxy", AopUtils.isAopProxy(repository), is(true));
assertThat("@Scheduled method never called", repository.getInvocationCount(), greaterThan(0));
}