Added unit tests for direction