MetricSourceConfig { @Bean public ServiceListFactoryBean metricSourceServiceListFactoryBean() { ServiceListFactoryBean serviceListFactoryBean = new ServiceListFactoryBean(); serviceListFactoryBean.setServiceType(MetricSource.class); return serviceListFactoryBean; }  @Bean ServiceListFactoryBean metricSourceServiceListFactoryBean();  }
@Test public void testGetBean() { val serviceTypeName = metricSourceConfig.metricSourceServiceListFactoryBean().getServiceType().getName(); assertNotNull(serviceTypeName); assertEquals("com.expedia.adaptivealerting.modelservice.metricsource.MetricSource", serviceTypeName); }