File keysFile = new File(base, "test.master.keys");
DummyRandomSource random = new DummyRandomSource(77391);
MasterKeys original = MasterKeys.read(keysFile, random, password);
byte[] clientCacheMasterKey = original.clientCacheMasterKey;
DatabaseKey dkey = original.createDatabaseKey(random);
MasterSecret tempfileMasterSecret = original.getPersistentMasterSecret();
MasterKeys restored = MasterKeys.read(keysFile, random, password);
assertArrayEquals(clientCacheMasterKey, restored.clientCacheMasterKey);
assertEquals(dkey,restored.createDatabaseKey(random));
assertEquals(tempfileMasterSecret, restored.getPersistentMasterSecret());
}