}
};
}
};
final Deflector deflector = mock(Deflector.class);
final IndexRotationThread rotationThread = new IndexRotationThread(
mock(NotificationService.class),
mock(Indices.class),
deflector,
mock(ActivityWriter.class),
mock(IndexerSetupService.class),
provider
);
when(deflector.getNewestTargetName()).thenReturn("some_index");
rotationThread.checkForRotation();
verify(deflector, times(1)).cycle();
verify(deflector, times(1)).getNewestTargetName();