replaced sinon test with lively spy