    @Test
    public void getsCorrectProcessDescriptions() {

        Map<Integer, String> pidDescriptions = new HashMap<>();
        pidDescriptions.put(123, "toaster");
        pidDescriptions.put(1, null);
        pidDescriptions.put(3848, "ayy");

        List<Integer> expectedPids = new ArrayList<>(pidDescriptions.keySet());
        // pass `new` list so that `enumerator` can't break the test by mutating expectedPids
        pidEnumerator = () -> new ArrayList<>(expectedPids);
        collector = pid -> new NativeProcessImpl(pid, pidDescriptions.get(pid), null);

        List<NativeProcess> processes = enumerator.getProcesses();
        for (NativeProcess process : processes) {
            int pid = process.getPid();
            String description = process.getDescription();
            assertEquals(pidDescriptions.get(pid), description);
        }
    }