Adding unit test hooks