Infrastructure for unit testing