CGroupsBlkioResourceHandlerImpl implements DiskResourceHandler { @Override public List<PrivilegedOperation> bootstrap(Configuration configuration) throws ResourceHandlerException { this.cGroupsHandler .initializeCGroupController(CGroupsHandler.CGroupController.BLKIO); return null; } CGroupsBlkioResourceHandlerImpl(CGroupsHandler cGroupsHandler); @Override List<PrivilegedOperation> bootstrap(Configuration configuration); @Override List<PrivilegedOperation> preStart(Container container); @Override List<PrivilegedOperation> reacquireContainer(ContainerId containerId); @Override List<PrivilegedOperation> updateContainer(Container container); @Override List<PrivilegedOperation> postComplete(ContainerId containerId); @Override List<PrivilegedOperation> teardown();  }
@Test public void testBootstrap() throws Exception { Configuration conf = new YarnConfiguration(); List<PrivilegedOperation> ret = cGroupsBlkioResourceHandlerImpl.bootstrap(conf); verify(mockCGroupsHandler, times(1)).initializeCGroupController( CGroupsHandler.CGroupController.BLKIO); Assert.assertNull(ret); }