### Question:
ServiceFactory extends AbstractLifecycle { public void registerService(Class<?> serviceClass) { com.ly.train.flower.common.annotation.FlowerService flowerService = serviceClass.getAnnotation(com.ly.train.flower.common.annotation.FlowerService.class); if (flowerService == null) { return; } if (FlowerService.class.isAssignableFrom(serviceClass)) { final String flowerServiceName = FlowerServiceUtil.getServiceName(serviceClass); registerService(flowerServiceName, serviceClass); } serviceLoader.registerServiceType(serviceClass); } ServiceFactory(FlowerFactory flowerFactory); ServiceLoader getServiceLoader(); void registerService(Class<?> serviceClass); void registerService(String serviceName, String serviceClassName); void registerService(String serviceName, Class<?> serviceClass); void registerService(Map<String, String> map); void registerFlowerService(String serviceName, FlowerService flowerService); MethodProxy getService(String serviceName); String getServiceClassName(String serviceName); String getServiceClassParameter(String serviceName); ServiceFlow getOrCreateServiceFlow(String flowName); ServiceMeta loadServiceMeta(ServiceConfig serviceConfig); List<ServiceInfo> loadServiceInfoFromRegistrry(ServiceConfig serviceConfig);  }### Answer:
@Test public void testRegisterService() { serviceFactory.registerService(DemoService.class); MethodProxy methodProxy = serviceFactory.getService(DemoService.class.getName() + ".say"); Assert.assertNotNull(methodProxy); Assert.assertNotNull(serviceFactory.getService(DemoService.class.getSimpleName())); methodProxy.process("aaa", null); }