Use Realm.close() in unit tests

They were unused methods