Adding tests for closing