add close() method to do 'expected closure'