public virtual void SetUp() { Configuration conf = new Configuration(); // Dispatcher that processes events inline dispatcher = new InlineDispatcher(); dispatcher.Register(typeof(RMNodeEventType), new TestNMReconnect.TestRMNodeEventDispatcher (this)); context = new RMContextImpl(dispatcher, null, null, null, null, null, null, null, null, null); dispatcher.Register(typeof(SchedulerEventType), new InlineDispatcher.EmptyEventHandler ()); dispatcher.Register(typeof(RMNodeEventType), new ResourceManager.NodeEventDispatcher (context)); NMLivelinessMonitor nmLivelinessMonitor = new NMLivelinessMonitor(dispatcher); nmLivelinessMonitor.Init(conf); nmLivelinessMonitor.Start(); NodesListManager nodesListManager = new NodesListManager(context); nodesListManager.Init(conf); RMContainerTokenSecretManager containerTokenSecretManager = new RMContainerTokenSecretManager (conf); containerTokenSecretManager.Start(); NMTokenSecretManagerInRM nmTokenSecretManager = new NMTokenSecretManagerInRM(conf ); nmTokenSecretManager.Start(); resourceTrackerService = new ResourceTrackerService(context, nodesListManager, nmLivelinessMonitor , containerTokenSecretManager, nmTokenSecretManager); resourceTrackerService.Init(conf); resourceTrackerService.Start(); }