Some infrastructure for unit tests