testcase with dispose