ResourcePluginManager { public synchronized Map<String, ResourcePlugin> getNameToPlugins() { return configuredPlugins; }  void initialize(Context context); void initializePluggableDevicePlugins(Context context,
      Configuration configuration,
      Map<String, ResourcePlugin> pluginMap); @VisibleForTesting // Check if the implemented interfaces' signature is compatible void checkInterfaceCompatibility(Class<?> expectedClass,
      Class<?> actualClass); @VisibleForTesting boolean isConfiguredResourceName(String resourceName); @VisibleForTesting void setDeviceMappingManager(
      DeviceMappingManager deviceMappingManager); DeviceMappingManager getDeviceMappingManager(); void cleanup(); synchronized Map<String, ResourcePlugin> getNameToPlugins();  }
@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)); }