test with stubbing input and output