tests for close and toString