title: How can I exhaust /dev/urandom for testing?
body: <p>I recently had a bug where I didn't properly handle when the entropy on my linux server got too low and a read of /dev/urandom returned less than the number of bytes expected.</p>
  
  <p>How can I recreate this with a test?  Is there a way to lower the entropy on a system or to reliably empty /dev/urandom?</p>
  
  <p>I'd like to be able to have a regression test that will verify my fix.  I'm using Ubuntu 12.04.</p>