{
Assert.assertTrue(providerConfig.get().getConfig().isRolling());
String rollingHostName = providerConfig.get().getConfig().getRollingConfigState().getRollingHostNames().get(providerConfig.get().getConfig().getRollingConfigState().getRollingHostNamesIndex());
Assert.assertEquals(rollingHostName, hostname);
stateAndLeader = new StateAndLeader(InstanceStateTypes.DOWN, stateAndLeader.isLeader());
Executors.newSingleThreadScheduledExecutor().schedule
(
new Runnable()
{
@Override
public void run()
{
stateAndLeader = new StateAndLeader(InstanceStateTypes.SERVING, stateAndLeader.isLeader());
}
},
10,
TimeUnit.MILLISECONDS
);