@Test public void testInstanceGroupAdded() { int initialCount = cache.getInstanceGroups().size(); instanceGroupsGenerator = instanceGroupsGenerator.apply(testConnector::addInstanceGroup); testScheduler.advanceTimeBy(FULL_CACHE_REFRESH_INTERVAL_MS, TimeUnit.MILLISECONDS); InstanceGroup instanceGroup = CollectionsExt.last(testConnector.getInstanceGroups().toBlocking().singleOrDefault(Collections.emptyList())); assertThat(cache.getInstanceGroups()).hasSize(initialCount + 1); expectInstanceGroupAddedEvent(eventSubscriber, instanceGroup.getId()); }
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);   }