unit tests for card path