//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void trackRecordsAvailability()
        public virtual void TrackRecordsAvailability()
        {
            DynamicRecord dynamicRecord1 = new DynamicRecord(1);
            DynamicRecord dynamicRecord2 = new DynamicRecord(1);

            ReusableRecordsAllocator recordsAllocator = new ReusableRecordsAllocator(10, dynamicRecord1, dynamicRecord2);

            assertSame("Should be the same as first available record.", dynamicRecord1, recordsAllocator.NextRecord());
            assertTrue("Should have second record.", recordsAllocator.HasNext());
            assertSame("Should be the same as second available record.", dynamicRecord2, recordsAllocator.NextRecord());
            assertFalse("Should be out of available records", recordsAllocator.HasNext());
        }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void allocatePreviouslyUsedRecord()
        public virtual void AllocatePreviouslyUsedRecord()
        {
            DynamicRecord dynamicRecord = new DynamicRecord(1);

            dynamicRecord.InUse = true;

            ReusableRecordsAllocator recordsAllocator = new ReusableRecordsAllocator(10, dynamicRecord);
            DynamicRecord            allocatedRecord  = recordsAllocator.NextRecord();

            assertSame("Records should be the same.", allocatedRecord, dynamicRecord);
            assertTrue("Record should be marked as used.", allocatedRecord.InUse());
            assertFalse("Record should be marked as created.", allocatedRecord.Created);
        }
 public ReusableRecordsCompositeAllocator(IEnumerator <DynamicRecord> recordsIterator, DynamicRecordAllocator recordAllocator)
 {
     this._reusableRecordsAllocator = new ReusableRecordsAllocator(recordAllocator.RecordDataSize, recordsIterator);
     this._recordAllocator          = recordAllocator;
 }