Added tests for dispose