Patch Set 3: I would prefer that you didn't submit this

- rebased to current master
- fixed some style nits
- removed some commented out dead code

great improvement in test coverage ;-)

On my laptop I face spurious test failures, sometimes I get invalid thread access exceptions and sometimes InvocationTargetException in fetch and push tests.

I think the fixes should better be committed as separate changes.