@Test public void collectReturnsUnknownDescriptionIfProcessCannotBeAccessed() { NativeProcess process = collector.collect(1234); assertEquals(NativeProcess.UNKNOWN_DESCRIPTION, process.getDescription()); }
@Override public NativeProcess collect(int pid) { Path procPath = procRoot.resolve(Integer.toUnsignedString(pid)); NativeProcess process = readNativeProcess(procPath); process.setPid(pid); return process; }
LinuxNativeProcessCollector implements NativeProcessCollector { @Override public NativeProcess collect(int pid) { Path procPath = procRoot.resolve(Integer.toUnsignedString(pid)); NativeProcess process = readNativeProcess(procPath); process.setPid(pid); return process; } }
LinuxNativeProcessCollector implements NativeProcessCollector { @Override public NativeProcess collect(int pid) { Path procPath = procRoot.resolve(Integer.toUnsignedString(pid)); NativeProcess process = readNativeProcess(procPath); process.setPid(pid); return process; } LinuxNativeProcessCollector(Path procRoot); }
LinuxNativeProcessCollector implements NativeProcessCollector { @Override public NativeProcess collect(int pid) { Path procPath = procRoot.resolve(Integer.toUnsignedString(pid)); NativeProcess process = readNativeProcess(procPath); process.setPid(pid); return process; } LinuxNativeProcessCollector(Path procRoot); @Override NativeProcess collect(int pid); }
LinuxNativeProcessCollector implements NativeProcessCollector { @Override public NativeProcess collect(int pid) { Path procPath = procRoot.resolve(Integer.toUnsignedString(pid)); NativeProcess process = readNativeProcess(procPath); process.setPid(pid); return process; } LinuxNativeProcessCollector(Path procRoot); @Override NativeProcess collect(int pid);  }