Adds tests for all success cases; todo add tests for error cases