@Test
    public void sumAndViewFromMultipleThreads() {
        ObservableSumUpdater updater = new ObservableSumUpdater();
        ThreadLocalDirectory<Integer, Integer> s = new ThreadLocalDirectory<>(updater);
        Thread[] threads = new Thread[500];
        for (int i = 0; i < 500; ++i) {
            CounterAndViewer c = new CounterAndViewer(s);
            threads[i] = new Thread(c);
        }
        runAll(threads);
        List<Integer> measurements = s.fetch();
        int sum = 0;
        for (Integer i : measurements) {
            sum += i.intValue();
        }
        assertTrue("Data lost.", 62375000 == sum);
    }
Smoke test for multi producer data structure.

<p>
TODO sorely needs nastier cases
</p>

@author <a href="mailto:steinar@yahoo-inc.com">Steinar Knutsen</a>
vespajlib/src/test/java/com/yahoo/concurrent/ThreadLocalDirectoryTestCase.java