@Test public void handleFullSegment() throws Exception { SegmentInfo segInfo = mock(SegmentInfo.class); HistoryBlockImporter<SwiftSourceAlloter<?, RowInfo>> historyBlockImporter = spy(new HistoryBlockImporter<SwiftSourceAlloter<?, RowInfo>>(mock(DataSource.class), mock(SwiftSourceAlloter.class))); SegmentKey segKey = mock(SegmentKey.class); doReturn(segKey).when(historyBlockImporter, "newSegmentKey", segInfo); mockStatic(SwiftEventDispatcher.class); historyBlockImporter.handleFullSegment(segInfo); verifyStatic(SwiftEventDispatcher.class); SwiftEventDispatcher.syncFire(SegmentEvent.UPLOAD_HISTORY, segKey); }
@Override protected void handleFullSegment(SegmentInfo segInfo) { try { SegmentKey segKey = newSegmentKey(segInfo); SwiftEventDispatcher.syncFire(SegmentEvent.UPLOAD_HISTORY, segKey); } catch (Exception e) { SwiftLoggers.getLogger().error(e); } }
HistoryBlockImporter extends BaseBlockImporter<A, SwiftResultSet> { @Override protected void handleFullSegment(SegmentInfo segInfo) { try { SegmentKey segKey = newSegmentKey(segInfo); SwiftEventDispatcher.syncFire(SegmentEvent.UPLOAD_HISTORY, segKey); } catch (Exception e) { SwiftLoggers.getLogger().error(e); } } }
HistoryBlockImporter extends BaseBlockImporter<A, SwiftResultSet> { @Override protected void handleFullSegment(SegmentInfo segInfo) { try { SegmentKey segKey = newSegmentKey(segInfo); SwiftEventDispatcher.syncFire(SegmentEvent.UPLOAD_HISTORY, segKey); } catch (Exception e) { SwiftLoggers.getLogger().error(e); } } HistoryBlockImporter(DataSource dataSource, A alloter); }
HistoryBlockImporter extends BaseBlockImporter<A, SwiftResultSet> { @Override protected void handleFullSegment(SegmentInfo segInfo) { try { SegmentKey segKey = newSegmentKey(segInfo); SwiftEventDispatcher.syncFire(SegmentEvent.UPLOAD_HISTORY, segKey); } catch (Exception e) { SwiftLoggers.getLogger().error(e); } } HistoryBlockImporter(DataSource dataSource, A alloter);  }
HistoryBlockImporter extends BaseBlockImporter<A, SwiftResultSet> { @Override protected void handleFullSegment(SegmentInfo segInfo) { try { SegmentKey segKey = newSegmentKey(segInfo); SwiftEventDispatcher.syncFire(SegmentEvent.UPLOAD_HISTORY, segKey); } catch (Exception e) { SwiftLoggers.getLogger().error(e); } } HistoryBlockImporter(DataSource dataSource, A alloter);   }