Add tests for ndb_persistence

Add unit tests for ndb_persistence module