Added unit testing for dependent destroy