### Question:
SingletonDemo { @Bean(name = "blog1") @Scope("singleton") public Blog getBlog() { return new Blog(); }  @Bean(name = "blog1") @Scope("singleton") Blog getBlog();  }### Answer:
@Test void getBlog() { Blog blogInstance1 = applicationContext.getBean("blog1", Blog.class); Blog blogInstance2 = applicationContext.getBean("blog1", Blog.class); assertThat(blogInstance1.equals(to(blogInstance2))); }