passing tests for happy and sad paths