### Question:
ThreadTimeEntropySource implements EntropySource { @Override public void event(EventScheduler scheduler, EventAdder adder) { long threadTime = threadMXBean.getCurrentThreadCpuTime() + threadMXBean.getCurrentThreadUserTime(); adder.add(Util.twoLeastSignificantBytes(threadTime)); scheduler.schedule(100, TimeUnit.MILLISECONDS); }  @Override void event(EventScheduler scheduler, EventAdder adder);  }### Answer:
@Test public void shouldAddBytes() throws Exception { target.event( new EventScheduler() { @Override public void schedule(long delay, TimeUnit timeUnit) { assertEquals(100, timeUnit.toMillis(delay)); schedules++; } }, new EventAdder() { @Override public void add(byte[] event) { assertEquals(2, event.length); adds++; } } ); assertEquals(1, schedules); assertEquals(1, adds); }