Added test case for checking data persistency after closing db.
Added test case for checking if database is open after closing and opening again.