@Test public void testBootstrapWithoutKnownInstanceGroups() { assertThat(instanceGroupIds(cache.getInstanceGroups())).containsAll(testConnector.takeInstanceGroupIds()); InstanceGroup firstInstanceGroup = testConnector.takeInstanceGroup(0); assertThat(cache.getInstanceGroups()).contains(firstInstanceGroup); assertThat(firstInstanceGroup.getInstanceIds()).containsAll(instanceIds(testConnector.takeInstances(0))); InstanceGroup secondInstanceGroup = testConnector.takeInstanceGroup(1); assertThat(cache.getInstanceGroups()).contains(secondInstanceGroup); assertThat(secondInstanceGroup.getInstanceIds()).containsAll(instanceIds(testConnector.takeInstances(1))); testScheduler.advanceTimeBy(CACHE_REFRESH_INTERVAL_MS, TimeUnit.MILLISECONDS); assertThat(eventSubscriber.takeNext()).isNull(); }
List<InstanceGroup> getInstanceGroups() { return cacheSnapshot.getInstanceGroups(); }
InstanceCache { List<InstanceGroup> getInstanceGroups() { return cacheSnapshot.getInstanceGroups(); } }
InstanceCache { List<InstanceGroup> getInstanceGroups() { return cacheSnapshot.getInstanceGroups(); } private  InstanceCache(AgentManagementConfiguration configuration,
                          InstanceCloudConnector connector,
                          Set<String> knownInstanceGroups,
                          Registry registry,
                          int bootRetryCount,
                          long bootRetryDelayMs,
                          Scheduler scheduler); }
InstanceCache { List<InstanceGroup> getInstanceGroups() { return cacheSnapshot.getInstanceGroups(); } private  InstanceCache(AgentManagementConfiguration configuration,
                          InstanceCloudConnector connector,
                          Set<String> knownInstanceGroups,
                          Registry registry,
                          int bootRetryCount,
                          long bootRetryDelayMs,
                          Scheduler scheduler);  }
InstanceCache { List<InstanceGroup> getInstanceGroups() { return cacheSnapshot.getInstanceGroups(); } private  InstanceCache(AgentManagementConfiguration configuration,
                          InstanceCloudConnector connector,
                          Set<String> knownInstanceGroups,
                          Registry registry,
                          int bootRetryCount,
                          long bootRetryDelayMs,
                          Scheduler scheduler);   }