### Question:
Incrementer extends BaseBlockImporter<A, SwiftResultSet> { @Override protected void handleFullSegment(SegmentInfo segInfo) { SegmentKey segKey = newSegmentKey(segInfo); SwiftEventDispatcher.asyncFire(SegmentEvent.TRANSFER_REALTIME, TransferRealtimeEventData.ofActive(segKey)); } Incrementer(DataSource dataSource, A alloter);   }### Answer:
@Test public void handleFullSegment() throws Exception { SegmentInfo segInfo = mock(SegmentInfo.class); Incrementer<SwiftSourceAlloter<?, RowInfo>> incrementer = spy(new Incrementer<SwiftSourceAlloter<?, RowInfo>>(mock(DataSource.class), mock(SwiftSourceAlloter.class))); SegmentKey segKey = mock(SegmentKey.class); doReturn(segKey).when(incrementer, "newSegmentKey", segInfo); mockStatic(SwiftEventDispatcher.class); incrementer.handleFullSegment(segInfo); verifyStatic(SwiftEventDispatcher.class); SwiftEventDispatcher.asyncFire(SegmentEvent.TRANSFER_REALTIME, segKey); }