Completed getDirection method and jUnit