Im trying to unit test a migration on Realm. My main question is: how can I maintain different schema versions of a RealmObject so as to be able to create a an instance of t
At Realm we test the migration mechanism by storing old Realm files as assets (see https://github.com/realm/realm-java/tree/master/realm/realm-library/src/androidTest/assets) and then write tests to check the result after a migration test (see https://github.com/realm/realm-java/blob/master/realm/realm-library/src/androidTest/java/io/realm/RealmMigrationTests.java).