public void testCompressionSnappy() throws Exception { paginatedCluster.set(OCluster.ATTRIBUTES.COMPRESSION, OSnappyCompression.NAME); paginatedCluster.set(OCluster.ATTRIBUTES.RECORD_GROW_FACTOR, 1); byte[] record = new byte[100]; Random random = new Random(); random.nextBytes(record); OPhysicalPosition physicalPosition = paginatedCluster .createRecord(record, OVersionFactory.instance().createVersion(), (byte) 1); record = OSnappyCompression.INSTANCE.compress(record); OCacheEntry cacheEntry = diskCache.load(1, 1, false); OCachePointer pagePointer = cacheEntry.getCachePointer(); int recordIndex = (int) (physicalPosition.clusterPosition.longValue() & 0xFFFF); OClusterPage page = new OClusterPage(pagePointer.getDataPointer(), false, ODurablePage.TrackMode.NONE); byte[] storedEntity = page.getRecordBinaryValue(recordIndex, 0, page.getRecordSize(recordIndex)); byte[] storedRecord = new byte[record.length]; System.arraycopy(storedEntity, OIntegerSerializer.INT_SIZE + OByteSerializer.BYTE_SIZE, storedRecord, 0, storedRecord.length); Assert.assertEquals(storedRecord, record); diskCache.release(cacheEntry); }