### Question:
AbstractSegmentRecovery implements SegmentRecovery { @Override public void recover(SourceKey tableKey) { recover(getUnstoredSegmentKeys(tableKey)); }  @Override void recover(SourceKey tableKey); @Override void recoverAll();  }### Answer:
@Test public void recover() throws Exception { SegRecovery recovery = spy(new SegRecovery()); SourceKey tableKey = new SourceKey("t"); List<SegmentKey> segKeys = Arrays.asList(mock(SegmentKey.class), mock(SegmentKey.class)); doReturn(segKeys).when(recovery, "getUnstoredSegmentKeys", tableKey); recovery.recover(tableKey); verify(recovery).recover(segKeys); }