@Test
public void testGenericServiceConfigThroughSpring() throws Exception {
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(ConfigTest.class.getPackage().getName().replace('.', '/') + "/generic-export.xml");
try {
ctx.start();
ServiceConfig serviceConfig = (ServiceConfig) ctx.getBean("dubboDemoService");
URL url = (URL)serviceConfig.getExportedUrls().get(0);
Assert.assertEquals(Constants.GENERIC_SERIALIZATION_BEAN, url.getParameter(Constants.GENERIC_KEY));
} finally {
ctx.destroy();
}
}