BeanUtil implements ApplicationContextAware { public static <T> T getBean(Class<T> beanClass) { return context.getBean(beanClass); }  @Override void setApplicationContext(ApplicationContext applicationContext); static T getBean(Class<T> beanClass);  }
@Test public void testGetBean() { GraphiteProperties classBean = BeanUtil.getBean(GraphiteProperties.class); assertNotNull(classBean); }