/** * Init. * * @throws Exception */ @BeforeMethod public void init() throws Exception { MockitoAnnotations.initMocks(this); buffer = new AtomicBuffer<>(); buffer.bufferProperties = bufferProperties; buffer.objectSizes = objectSizes; buffer.indexingTree = indexingTree; buffer.log = LoggerFactory.getLogger(AtomicBuffer.class); when(bufferProperties.getIndexingTreeCleaningThreads()).thenReturn(1); buffer.postConstruct(); }
long elementSize = 10; when(objectSizes.getObjectSecurityExpansionRate()).thenReturn(expansionRate); buffer.postConstruct();
when(bufferProperties.getEvictionOccupancyPercentage()).thenReturn(0.1f); when(bufferProperties.getEvictionFragmentSizePercentage()).thenReturn(0.5f); buffer.postConstruct();
buffer.postConstruct();
when(bufferProperties.getIndexingWaitTime()).thenReturn(10L); when(indexingTree.getComponentSize(objectSizes)).thenReturn(10L); buffer.postConstruct();