Writing unit test