add test with mock and spy