@Test public void shouldNotSynchronizeAnything_whenNoConfigurationsSet() { testee.sync(); InOrder order = inOrder(applicationConfiguratorMock, policyConfiguratorMock, conditionConfiguratorMock, externalServiceConditionConfiguratorMock, nrqlConditionConfiguratorMock, syntheticsConditionConfiguratorMock, channelConfiguratorMock); order.verifyNoMoreInteractions(); }
public void sync() { for (ApplicationConfiguration applicationConfiguration : applicationConfigurations) { applicationConfigurator.sync(applicationConfiguration); } for (PolicyConfiguration configuration : policyConfigurations) { policyConfigurator.sync(configuration); conditionConfigurator.sync(configuration); externalServiceConditionConfigurator.sync(configuration); nrqlConditionConfigurator.sync(configuration); syntheticsConditionConfigurator.sync(configuration); channelConfigurator.sync(configuration); } }
Configurator { public void sync() { for (ApplicationConfiguration applicationConfiguration : applicationConfigurations) { applicationConfigurator.sync(applicationConfiguration); } for (PolicyConfiguration configuration : policyConfigurations) { policyConfigurator.sync(configuration); conditionConfigurator.sync(configuration); externalServiceConditionConfigurator.sync(configuration); nrqlConditionConfigurator.sync(configuration); syntheticsConditionConfigurator.sync(configuration); channelConfigurator.sync(configuration); } } }
Configurator { public void sync() { for (ApplicationConfiguration applicationConfiguration : applicationConfigurations) { applicationConfigurator.sync(applicationConfiguration); } for (PolicyConfiguration configuration : policyConfigurations) { policyConfigurator.sync(configuration); conditionConfigurator.sync(configuration); externalServiceConditionConfigurator.sync(configuration); nrqlConditionConfigurator.sync(configuration); syntheticsConditionConfigurator.sync(configuration); channelConfigurator.sync(configuration); } } Configurator(@NonNull String apiKey);   Configurator(ApplicationConfigurator applicationConfigurator,
                 PolicyConfigurator policyConfigurator,
                 ConditionConfigurator conditionConfigurator,
                 ExternalServiceConditionConfigurator externalServiceConditionConfigurator,
                 NrqlConditionConfigurator nrqlConditionConfigurator,
                 SyntheticsConditionConfigurator syntheticsConditionConfigurator,
                 ChannelConfigurator channelConfigurator); }
Configurator { public void sync() { for (ApplicationConfiguration applicationConfiguration : applicationConfigurations) { applicationConfigurator.sync(applicationConfiguration); } for (PolicyConfiguration configuration : policyConfigurations) { policyConfigurator.sync(configuration); conditionConfigurator.sync(configuration); externalServiceConditionConfigurator.sync(configuration); nrqlConditionConfigurator.sync(configuration); syntheticsConditionConfigurator.sync(configuration); channelConfigurator.sync(configuration); } } Configurator(@NonNull String apiKey);   Configurator(ApplicationConfigurator applicationConfigurator,
                 PolicyConfigurator policyConfigurator,
                 ConditionConfigurator conditionConfigurator,
                 ExternalServiceConditionConfigurator externalServiceConditionConfigurator,
                 NrqlConditionConfigurator nrqlConditionConfigurator,
                 SyntheticsConditionConfigurator syntheticsConditionConfigurator,
                 ChannelConfigurator channelConfigurator); void sync(); void setApplicationConfigurations(@NonNull Collection<ApplicationConfiguration> applicationConfigurations); void setPolicyConfigurations(@NonNull Collection<PolicyConfiguration> policyConfigurations); }
Configurator { public void sync() { for (ApplicationConfiguration applicationConfiguration : applicationConfigurations) { applicationConfigurator.sync(applicationConfiguration); } for (PolicyConfiguration configuration : policyConfigurations) { policyConfigurator.sync(configuration); conditionConfigurator.sync(configuration); externalServiceConditionConfigurator.sync(configuration); nrqlConditionConfigurator.sync(configuration); syntheticsConditionConfigurator.sync(configuration); channelConfigurator.sync(configuration); } } Configurator(@NonNull String apiKey);   Configurator(ApplicationConfigurator applicationConfigurator,
                 PolicyConfigurator policyConfigurator,
                 ConditionConfigurator conditionConfigurator,
                 ExternalServiceConditionConfigurator externalServiceConditionConfigurator,
                 NrqlConditionConfigurator nrqlConditionConfigurator,
                 SyntheticsConditionConfigurator syntheticsConditionConfigurator,
                 ChannelConfigurator channelConfigurator); void sync(); void setApplicationConfigurations(@NonNull Collection<ApplicationConfiguration> applicationConfigurations); void setPolicyConfigurations(@NonNull Collection<PolicyConfiguration> policyConfigurations);  }