Code from OS Bridge 2014 presentation "Don't Let Your Tests Flake Out"