public synchronized Map<String, ResourcePlugin> getNameToPlugins() {
    return configuredPlugins;
  }
@Test(timeout = 30000)
  public void testNodeStatusUpdaterWithResourcePluginsEnabled()
      throws Exception {
    final ResourcePluginManager rpm = stubResourcePluginmanager();

    nm = new ResourcePluginMockNM(rpm);

    nm.init(conf);
    nm.start();

    NodeResourceUpdaterPlugin nodeResourceUpdaterPlugin =
        rpm.getNameToPlugins().get("resource1")
            .getNodeResourceHandlerInstance();

    verify(nodeResourceUpdaterPlugin)
        .updateConfiguredResource(any(Resource.class));
  }