@Test
public void testDiscoverNewInstanceGroup() {

    int initialCount = cache.getInstanceGroups().size();
    InstanceGroup instanceGroupToAdd = instanceGroupsGenerator.getValue();
    testConnector.addInstanceGroup(instanceGroupToAdd);
    testScheduler.advanceTimeBy(FULL_CACHE_REFRESH_INTERVAL_MS, TimeUnit.MILLISECONDS);
    assertThat(cache.getInstanceGroups()).hasSize(initialCount + 1);
    // We need to count both the setup additions, and this one
    verify(agentStore, times(initialCount + 1)).storeAgentInstanceGroup(any());
    expectInstanceGroupUpdateEvent(eventSubscriber, instanceGroupToAdd.getId());
}