mockExhibitorInstance.getMockConfigProvider().setConfig(IntConfigs.AUTO_MANAGE_INSTANCES, 1);
mockExhibitorInstance.getMockConfigProvider().setConfig(IntConfigs.AUTO_MANAGE_INSTANCES_FIXED_ENSEMBLE_SIZE, 3);
mockExhibitorInstance.getMockConfigProvider().setConfig(IntConfigs.AUTO_MANAGE_INSTANCES_SETTLING_PERIOD_MS, 0);
List<ServerStatus> statuses = Lists.newArrayList();
statuses.add(new ServerStatus("a", InstanceStateTypes.SERVING.getCode(), "", true));
statuses.add(new ServerStatus("b", InstanceStateTypes.SERVING.getCode(), "", false));
statuses.add(new ServerStatus("c", InstanceStateTypes.SERVING.getCode(), "", false));
Mockito.when(mockExhibitorInstance.getMockForkJoinPool().invoke(Mockito.isA(ClusterStatusTask.class))).thenReturn(statuses);
final AtomicBoolean configWasChanged = new AtomicBoolean(false);
AutomaticInstanceManagement management = new AutomaticInstanceManagement(mockExhibitorInstance.getMockExhibitor())
{