### Question:
RegisteredBeanDefinition { public RuntimeBeanReference asReference() { return new RuntimeBeanReference(this.name); } RegisteredBeanDefinition(BeanDefinition beanDefinition, String name); BeanDefinition getBeanDefinition(); String getName(); RuntimeBeanReference asReference();  }### Answer:
@Test public void shouldGetAsReference() throws Exception { RuntimeBeanReference reference = this.registeredBeanDefinition.asReference(); assertThat(reference.getBeanName(), is(this.name)); }