@Test
public void testBootstrapWithKnownInstanceGroupsAndConnectorTimeout() {

    String id1 = testConnector.takeInstanceGroup(0).getId();
    String id2 = testConnector.takeInstanceGroup(1).getId();
    testConnector.addInterceptor(id1, id -> {
        throw new RuntimeException("Simulated connector error");
    });
    try {
        cache = InstanceCache.newInstance(configuration, testConnector, asSet(id1, id2), registry, 1, 1, Schedulers.computation());
    } catch (AgentManagementException e) {
        assertThat(e.getErrorCode()).isEqualTo(ErrorCode.InitializationError);
    }
}