add unit test for the destroy method