public ByteBuffer getByteBuffer() {
        ByteBuffer byteBuffer = ByteBuffer.allocate(32);
        byteBuffer.putInt(0, hashCode);
        byteBuffer.putInt(4, topicId);
        byteBuffer.putInt(8, queueId);
        byteBuffer.putLong(12, offset);
        byteBuffer.putInt(20, size);
        byteBuffer.putInt(24, timeDiff);
        byteBuffer.putInt(28, itemIndex);
        return byteBuffer;
    }
@Test
    public void getByteBufferTest() {
        IndexItem indexItem = new IndexItem(topicId, queueId, offset, size, hashCode, timeDiff, itemIndex);
        ByteBuffer byteBuffer = indexItem.getByteBuffer();
        Assert.assertEquals(hashCode, byteBuffer.getInt(0));
        Assert.assertEquals(topicId, byteBuffer.getInt(4));
        Assert.assertEquals(queueId, byteBuffer.getInt(8));
        Assert.assertEquals(offset, byteBuffer.getLong(12));
        Assert.assertEquals(size, byteBuffer.getInt(20));
        Assert.assertEquals(timeDiff, byteBuffer.getInt(24));
        Assert.assertEquals(itemIndex, byteBuffer.getInt(28));
    }