assertEquals("Hello from Repository ServiceWithAspect Prototype", beanPrototypeInstance.hello());
// swap service this prototype is dependent to
try {
swapClasses(BeanServiceImpl.class, BeanServiceImpl2.class.getName());
assertEquals("Hello from ChangedRepository Service2WithAspect Prototype", beanPrototypeInstance.hello());
throw new IllegalStateException("Reload prototype bean should not be correctly initialized.");
} catch (NullPointerException e) {
// BeanServiceImpl2 contains reference to different repository. Because existing reference
// is not changed, this reference is null
}