@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());
}