@Before public void setUp() throws Exception { EventBus eventBus = new SimpleEventBus(); eventHandler = new EventCollectingAppRegistryEventHandler(); eventBus.addHandler(AppRegistryEvent.class, eventHandler); appDescriptorRegistry = new AppDescriptorRegistry(eventBus); TypeMappingImpl typeMapping = new TypeMappingImpl(); Node2BeanTransformerImpl transformer = new Node2BeanTransformerImpl(new PreConfiguredBeanUtils()); ComponentsTestUtil.setInstance( Node2BeanProcessor.class, new Node2BeanProcessorImpl(typeMapping, transformer)); ComponentsTestUtil.setImplementation(AppDescriptor.class, ConfiguredAppDescriptor.class); }
@After public void tearDown() throws Exception { ComponentsTestUtil.clear(); }