add tests for method clear