### Question:
SnapshotDescriptor implements AutoCloseable { public SnapshotDescriptor(Buffer buffer) { this.buffer = checkNotNull(buffer, "buffer cannot be null"); this.index = buffer.readLong(); this.timestamp = buffer.readLong(); this.version = buffer.readInt(); this.locked = buffer.readBoolean(); buffer.skip(BYTES - buffer.position()); } SnapshotDescriptor(Buffer buffer); static Builder builder(); static Builder builder(Buffer buffer); long index(); long timestamp(); int version(); boolean isLocked(); void lock(); @Override void close(); void delete(); static final int BYTES; static final int VERSION; }### Answer:
@Test public void testSnapshotDescriptor() throws Exception { SnapshotDescriptor descriptor = SnapshotDescriptor.builder() .withIndex(2) .withTimestamp(3) .build(); assertEquals(2, descriptor.index()); assertEquals(3, descriptor.timestamp()); assertEquals(1, descriptor.version()); }