public void testWriteToNewWavelet() throws Exception {
Pair<DeltaStore,WaveletDeltaRecord> pair = newDeltaStoreWithRecord(WAVE1_WAVELET1);
DeltaStore store = pair.first;
WaveletDeltaRecord record = pair.second;
DeltasAccess wavelet = store.open(WAVE1_WAVELET1);
assertFalse(wavelet.isEmpty());
assertEquals(WAVE1_WAVELET1, wavelet.getWaveletName());
assertEquals(record.getResultingVersion(), wavelet.getEndVersion());
assertEquals(record, wavelet.getDelta(0));
assertEquals(record, wavelet.getDeltaByEndVersion(record.getResultingVersion().getVersion()));
assertEquals(record.getAppliedAtVersion(), wavelet.getAppliedAtVersion(0));
assertEquals(record.getAppliedDelta(), wavelet.getAppliedDelta(0));
assertEquals(record.getTransformedDelta(), wavelet.getTransformedDelta(0));
wavelet.close();
}