Adding unit tests for routine functions