testFreeAndOpen