DefaultProcReader implements ProcReader { @Override public List<File> listContainerCgroupFiles() throws FileNotFoundException { File file = new File(cgroupBasePath); if (!file.exists()) { throw new FileNotFoundException(cgroupBasePath + " is not exist!"); } return Arrays.asList(file.listFiles(new FileFilter() { @Override public boolean accept(File pathname) { return pathname.getName().length() == containerNameLength; } })); }  @Override List<File> listContainerCgroupFiles(); @Override List<String> listProcesses(File cgroupFile); @Override Map<String, ProcStatus> listTaskStatus(String pid); static final String CGROUP_PROCS; static final String STATUS; }
@Test public void testListCgroupFile() throws Exception { Assert.assertTrue(procReader.listContainerCgroupFiles().size() == 2); }