final byte[] allocatedPayload1 = MemoryTestUtils.generateRandomPayload( size1 );
final Pointer<Object> allocatedPointer1 = mms.allocate( Object.class, allocatedPayload1.length, -1, -1 );
Assert.assertNotNull( allocatedPointer1 );
final MemoryBuffer buffer1 = allocatedPointer1.getMemoryBuffer();
Assert.assertNotNull( buffer1 );
Assert.assertEquals( 0, buffer1.writerIndex() );
Assert.assertEquals( size1, buffer1.capacity() );
Assert.assertEquals( size1, buffer1.capacity() );
buffer1.writeBytes( allocatedPayload1 );
Assert.assertEquals( new String( allocatedPayload1 ), new String( mms.retrieve( allocatedPointer1 ) ) );