Added function tests: open, close