ResourcePluginManager { public synchronized Map<String, ResourcePlugin> getNameToPlugins() { return configuredPlugins; }  synchronized void initialize(Context context); synchronized void cleanup(); synchronized Map<String, ResourcePlugin> getNameToPlugins();  }
@Test(timeout = 30000) public void testNodeStatusUpdaterWithResourcePluginsEnabled() throws Exception { final ResourcePluginManager rpm = stubResourcePluginmanager(); nm = new MyMockNM(rpm); YarnConfiguration conf = createNMConfig(); nm.init(conf); nm.start(); NodeResourceUpdaterPlugin nodeResourceUpdaterPlugin = rpm.getNameToPlugins().get("resource1") .getNodeResourceHandlerInstance(); verify(nodeResourceUpdaterPlugin, times(1)).updateConfiguredResource( any(Resource.class)); }