add test and spy