Added inline open/close test for comparison.