@Test public void call() { mockStatic(SwiftContext.class); when(SwiftContext.get()).thenReturn(mock(BeanFactory.class)); SegmentRecovery segmentRecovery = mock(SegmentRecovery.class); when(SwiftContext.get().getBean(SegmentRecovery.class)).thenReturn(segmentRecovery); SegmentKey segKey = mock(SegmentKey.class); new RecoveryJob(segKey).call(); verify(segmentRecovery).recover(Collections.singletonList(segKey)); }
@Override public Void call() { SegmentRecovery segmentRecovery = SwiftContext.get().getBean(SegmentRecovery.class); segmentRecovery.recover(Collections.singletonList(recoverSegKey)); return null; }
RecoveryJob extends BaseJob<Void, SegmentKey> { @Override public Void call() { SegmentRecovery segmentRecovery = SwiftContext.get().getBean(SegmentRecovery.class); segmentRecovery.recover(Collections.singletonList(recoverSegKey)); return null; } }
RecoveryJob extends BaseJob<Void, SegmentKey> { @Override public Void call() { SegmentRecovery segmentRecovery = SwiftContext.get().getBean(SegmentRecovery.class); segmentRecovery.recover(Collections.singletonList(recoverSegKey)); return null; } RecoveryJob(SegmentKey recoverSegKey); }
RecoveryJob extends BaseJob<Void, SegmentKey> { @Override public Void call() { SegmentRecovery segmentRecovery = SwiftContext.get().getBean(SegmentRecovery.class); segmentRecovery.recover(Collections.singletonList(recoverSegKey)); return null; } RecoveryJob(SegmentKey recoverSegKey); @Override Void call(); @Override SegmentKey serializedTag(); }
RecoveryJob extends BaseJob<Void, SegmentKey> { @Override public Void call() { SegmentRecovery segmentRecovery = SwiftContext.get().getBean(SegmentRecovery.class); segmentRecovery.recover(Collections.singletonList(recoverSegKey)); return null; } RecoveryJob(SegmentKey recoverSegKey); @Override Void call(); @Override SegmentKey serializedTag();  }