writing a unit test