From e8df8f0005e7280303609d0ad8613f1590a059f0 Mon Sep 17 00:00:00 2001 From: Julien Giovaresco Date: Fri, 8 Mar 2024 09:55:54 +0100 Subject: [PATCH] test: define a InMemoryConfiguration that can be shared Each rest module was defining its own InMemoryConfiguration. It was a pain when we introduce new InMemory implementation because we had to add the declaration in 3 files. Now there is only one InMemoryConfiguration located next to in memory alternatives. This configuration is packaged in test artifact and can be referenced in Spring configuration in each rest module. --- .../v2/rest/spring/InMemoryConfiguration.java | 229 ------------------ .../spring/ResourceContextConfiguration.java | 1 + .../rest/spring/InMemoryConfiguration.java | 198 --------------- .../spring/ResourceContextConfiguration.java | 1 + .../spring/ResourceContextConfiguration.java | 1 + .../spring/InMemoryConfiguration.java | 136 ++++++----- 6 files changed, 85 insertions(+), 481 deletions(-) delete mode 100644 gravitee-apim-rest-api/gravitee-apim-rest-api-management-v2/gravitee-apim-rest-api-management-v2-rest/src/test/java/io/gravitee/rest/api/management/v2/rest/spring/InMemoryConfiguration.java delete mode 100644 gravitee-apim-rest-api/gravitee-apim-rest-api-management/gravitee-apim-rest-api-management-rest/src/test/java/io/gravitee/rest/api/management/rest/spring/InMemoryConfiguration.java rename gravitee-apim-rest-api/{gravitee-apim-rest-api-portal/gravitee-apim-rest-api-portal-rest/src/test/java/io/gravitee/rest/api/portal/rest => gravitee-apim-rest-api-service/src/test/java/inmemory}/spring/InMemoryConfiguration.java (65%) diff --git a/gravitee-apim-rest-api/gravitee-apim-rest-api-management-v2/gravitee-apim-rest-api-management-v2-rest/src/test/java/io/gravitee/rest/api/management/v2/rest/spring/InMemoryConfiguration.java b/gravitee-apim-rest-api/gravitee-apim-rest-api-management-v2/gravitee-apim-rest-api-management-v2-rest/src/test/java/io/gravitee/rest/api/management/v2/rest/spring/InMemoryConfiguration.java deleted file mode 100644 index 8122ef9df1e..00000000000 --- a/gravitee-apim-rest-api/gravitee-apim-rest-api-management-v2/gravitee-apim-rest-api-management-v2-rest/src/test/java/io/gravitee/rest/api/management/v2/rest/spring/InMemoryConfiguration.java +++ /dev/null @@ -1,229 +0,0 @@ -/* - * Copyright © 2015 The Gravitee team (http://gravitee.io) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package io.gravitee.rest.api.management.v2.rest.spring; - -import inmemory.*; -import io.gravitee.apim.core.audit.query_service.AuditEventQueryService; -import io.gravitee.apim.core.event.crud_service.EventCrudService; -import io.gravitee.apim.core.event.query_service.EventQueryService; -import io.gravitee.apim.core.gateway.query_service.InstanceQueryService; -import io.gravitee.apim.core.installation.query_service.InstallationAccessQueryService; -import io.gravitee.apim.core.search.Indexer; -import io.gravitee.apim.infra.query_service.audit.AuditEventQueryServiceImpl; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Primary; - -@Configuration -public class InMemoryConfiguration { - - @Bean - public ApiQueryServiceInMemory apiQueryServiceInMemory() { - return new ApiQueryServiceInMemory(); - } - - @Bean - public ApiCrudServiceInMemory apiCrudServiceInMemory() { - return new ApiCrudServiceInMemory(); - } - - @Bean - public ApiMetadataQueryServiceInMemory apiMetadataQueryServiceInMemory() { - return new ApiMetadataQueryServiceInMemory(); - } - - @Bean - public ApplicationCrudServiceInMemory applicationRepository() { - return new ApplicationCrudServiceInMemory(); - } - - @Bean - public ApiKeyCrudServiceInMemory apiKeyCrudServiceInMemory() { - return new ApiKeyCrudServiceInMemory(); - } - - @Bean - public ApiKeyQueryServiceInMemory apiKeyQueryServiceInMemory(ApiKeyCrudServiceInMemory apiKeyCrudServiceInMemory) { - return new ApiKeyQueryServiceInMemory(apiKeyCrudServiceInMemory); - } - - @Bean - public AuditCrudServiceInMemory auditCrudServiceInMemory() { - return new AuditCrudServiceInMemory(); - } - - @Bean - public ConnectionLogsCrudServiceInMemory connectionLogRepository() { - return new ConnectionLogsCrudServiceInMemory(); - } - - @Bean - public EnvironmentCrudServiceInMemory environmentCrudServiceInMemory() { - return new EnvironmentCrudServiceInMemory(); - } - - @Bean - public MessageLogCrudServiceInMemory messageLogRepository() { - return new MessageLogCrudServiceInMemory(); - } - - @Bean - public PlanCrudServiceInMemory planCrudServiceInMemory() { - return new PlanCrudServiceInMemory(); - } - - @Bean - public PlanQueryServiceInMemory planQueryServiceInMemory() { - return new PlanQueryServiceInMemory(); - } - - @Bean - public SubscriptionCrudServiceInMemory subscriptionCrudServiceInMemory() { - return new SubscriptionCrudServiceInMemory(); - } - - @Bean - public SubscriptionQueryServiceInMemory subscriptionQueryServiceInMemory( - SubscriptionCrudServiceInMemory subscriptionCrudServiceInMemory - ) { - return new SubscriptionQueryServiceInMemory(subscriptionCrudServiceInMemory); - } - - @Bean - TriggerNotificationDomainServiceInMemory triggerNotificationDomainServiceInMemory() { - return new TriggerNotificationDomainServiceInMemory(); - } - - @Bean - public UserCrudServiceInMemory userCrudServiceInMemory() { - return new UserCrudServiceInMemory(); - } - - @Bean - public PageQueryServiceInMemory pageQueryServiceInMemory() { - return new PageQueryServiceInMemory(); - } - - @Bean - public PageCrudServiceInMemory pageCrudServiceInMemory() { - return new PageCrudServiceInMemory(); - } - - @Bean - public PageRevisionCrudServiceInMemory pageRevisionCrudServiceInMemory() { - return new PageRevisionCrudServiceInMemory(); - } - - @Bean - public AccessPointQueryServiceInMemory accessPointQueryServiceInMemory() { - return new AccessPointQueryServiceInMemory(); - } - - @Bean - public InstallationAccessQueryService installationAccessServiceInMemory() { - return new InstallationAccessQueryServiceInMemory(); - } - - @Bean - public ParametersDomainServiceInMemory parametersDomainServiceInMemory() { - return new ParametersDomainServiceInMemory(); - } - - @Bean - public InstanceQueryService instanceQueryService() { - return new InstanceQueryServiceInMemory(); - } - - @Bean - public EventCrudService eventCrudService() { - return new EventCrudInMemory(); - } - - @Bean - public ParametersQueryServiceInMemory parametersQueryServiceInMemory() { - return new ParametersQueryServiceInMemory(); - } - - @Bean - public EntrypointPluginQueryServiceInMemory entrypointPluginQueryServiceInMemory() { - return new EntrypointPluginQueryServiceInMemory(); - } - - @Bean - public EndpointPluginQueryServiceInMemory endpointPluginQueryServiceInMemory() { - return new EndpointPluginQueryServiceInMemory(); - } - - @Bean - public PolicyPluginQueryServiceInMemory policyPluginQueryServiceInMemory() { - return new PolicyPluginQueryServiceInMemory(); - } - - @Bean - public FlowCrudServiceInMemory flowCrudServiceInMemory() { - return new FlowCrudServiceInMemory(); - } - - @Bean - public LicenseCrudServiceInMemory licenseCrudServiceInMemory() { - return new LicenseCrudServiceInMemory(); - } - - @Bean - public AuditQueryServiceInMemory auditQueryServiceInMemory(AuditCrudServiceInMemory auditCrudServiceInMemory) { - return new AuditQueryServiceInMemory(auditCrudServiceInMemory); - } - - @Bean - public AuditMetadataQueryServiceInMemory auditMetadataQueryServiceInMemory() { - return new AuditMetadataQueryServiceInMemory(); - } - - @Bean - public AuditEventQueryService auditEventQueryService() { - return new AuditEventQueryServiceImpl(); - } - - @Bean - public EventQueryServiceInMemory eventQueryService() { - return new EventQueryServiceInMemory(); - } - - @Bean - public GroupQueryServiceInMemory groupQueryService() { - return new GroupQueryServiceInMemory(); - } - - @Bean - public MembershipQueryServiceInMemory membershipQueryServiceInMemory() { - return new MembershipQueryServiceInMemory(); - } - - @Bean - public RoleQueryServiceInMemory roleQueryServiceInMemory() { - return new RoleQueryServiceInMemory(); - } - - @Bean - public IndexerInMemory indexer() { - return new IndexerInMemory(); - } - - @Bean - public MembershipCrudServiceInMemory membershipCrudServiceInMemory() { - return new MembershipCrudServiceInMemory(); - } -} diff --git a/gravitee-apim-rest-api/gravitee-apim-rest-api-management-v2/gravitee-apim-rest-api-management-v2-rest/src/test/java/io/gravitee/rest/api/management/v2/rest/spring/ResourceContextConfiguration.java b/gravitee-apim-rest-api/gravitee-apim-rest-api-management-v2/gravitee-apim-rest-api-management-v2-rest/src/test/java/io/gravitee/rest/api/management/v2/rest/spring/ResourceContextConfiguration.java index 27d1faf58c7..6439af28b38 100644 --- a/gravitee-apim-rest-api/gravitee-apim-rest-api-management-v2/gravitee-apim-rest-api-management-v2-rest/src/test/java/io/gravitee/rest/api/management/v2/rest/spring/ResourceContextConfiguration.java +++ b/gravitee-apim-rest-api/gravitee-apim-rest-api-management-v2/gravitee-apim-rest-api-management-v2-rest/src/test/java/io/gravitee/rest/api/management/v2/rest/spring/ResourceContextConfiguration.java @@ -17,6 +17,7 @@ import static org.mockito.Mockito.mock; +import inmemory.spring.InMemoryConfiguration; import io.gravitee.apim.core.api.domain_service.ApiMetadataDecoderDomainService; import io.gravitee.apim.core.api.domain_service.ApiMetadataDomainService; import io.gravitee.apim.core.api.domain_service.ApiStateDomainService; diff --git a/gravitee-apim-rest-api/gravitee-apim-rest-api-management/gravitee-apim-rest-api-management-rest/src/test/java/io/gravitee/rest/api/management/rest/spring/InMemoryConfiguration.java b/gravitee-apim-rest-api/gravitee-apim-rest-api-management/gravitee-apim-rest-api-management-rest/src/test/java/io/gravitee/rest/api/management/rest/spring/InMemoryConfiguration.java deleted file mode 100644 index 74d2b843bb8..00000000000 --- a/gravitee-apim-rest-api/gravitee-apim-rest-api-management/gravitee-apim-rest-api-management-rest/src/test/java/io/gravitee/rest/api/management/rest/spring/InMemoryConfiguration.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Copyright © 2015 The Gravitee team (http://gravitee.io) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package io.gravitee.rest.api.management.rest.spring; - -import inmemory.*; -import io.gravitee.apim.core.environment.crud_service.EnvironmentCrudService; -import org.mockito.Mockito; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -@Configuration -public class InMemoryConfiguration { - - @Bean - public ApplicationCrudServiceInMemory applicationRepository() { - return new ApplicationCrudServiceInMemory(); - } - - @Bean - public ConnectionLogsCrudServiceInMemory connectionLogRepository() { - return new ConnectionLogsCrudServiceInMemory(); - } - - @Bean - public MessageLogCrudServiceInMemory messageLogRepository() { - return new MessageLogCrudServiceInMemory(); - } - - @Bean - public PlanCrudServiceInMemory planCrudServiceInMemory() { - return new PlanCrudServiceInMemory(); - } - - @Bean - public PlanQueryServiceInMemory planQueryServiceInMemory() { - return new PlanQueryServiceInMemory(); - } - - @Bean - public EnvironmentCrudService environmentCrudService() { - return new EnvironmentCrudServiceInMemory(); - } - - @Bean - public ApiQueryServiceInMemory apiQueryServiceInMemory() { - return new ApiQueryServiceInMemory(); - } - - @Bean - public ApiCrudServiceInMemory apiCrudServiceInMemory() { - return new ApiCrudServiceInMemory(); - } - - @Bean - public AuditCrudServiceInMemory auditCrudServiceInMemory() { - return new AuditCrudServiceInMemory(); - } - - @Bean - public UserCrudServiceInMemory userCrudServiceInMemory() { - return new UserCrudServiceInMemory(); - } - - @Bean - public SubscriptionCrudServiceInMemory subscriptionCrudServiceInMemory() { - return new SubscriptionCrudServiceInMemory(); - } - - @Bean - public SubscriptionQueryServiceInMemory subscriptionQueryServiceInMemory( - SubscriptionCrudServiceInMemory subscriptionCrudServiceInMemory - ) { - return new SubscriptionQueryServiceInMemory(subscriptionCrudServiceInMemory); - } - - @Bean - public ApiKeyCrudServiceInMemory apiKeyCrudServiceInMemory() { - return Mockito.spy(new ApiKeyCrudServiceInMemory()); - } - - @Bean - public ApiKeyQueryServiceInMemory apiKeyQueryServiceInMemory(ApiKeyCrudServiceInMemory apiKeyCrudServiceInMemory) { - return new ApiKeyQueryServiceInMemory(apiKeyCrudServiceInMemory); - } - - @Bean - public TriggerNotificationDomainServiceInMemory triggerNotificationDomainServiceInMemory() { - return new TriggerNotificationDomainServiceInMemory(); - } - - @Bean - public PageQueryServiceInMemory pageQueryServiceInMemory() { - return new PageQueryServiceInMemory(); - } - - @Bean - public PageCrudServiceInMemory pageCrudServiceInMemory() { - return new PageCrudServiceInMemory(); - } - - @Bean - public PageRevisionCrudServiceInMemory pageRevisionCrudServiceInMemory() { - return new PageRevisionCrudServiceInMemory(); - } - - @Bean - public InstanceQueryServiceInMemory instanceQueryServiceInMemory() { - return new InstanceQueryServiceInMemory(); - } - - @Bean - public EventCrudInMemory debugEventDomainServiceInMemory() { - return new EventCrudInMemory(); - } - - @Bean - public ParametersQueryServiceInMemory parametersQueryServiceInMemory() { - return new ParametersQueryServiceInMemory(); - } - - @Bean - public EntrypointPluginQueryServiceInMemory entrypointPluginQueryServiceInMemory() { - return new EntrypointPluginQueryServiceInMemory(); - } - - @Bean - public EndpointPluginQueryServiceInMemory endpointPluginQueryServiceInMemory() { - return new EndpointPluginQueryServiceInMemory(); - } - - @Bean - public PolicyPluginQueryServiceInMemory policyPluginQueryServiceInMemory() { - return new PolicyPluginQueryServiceInMemory(); - } - - @Bean - public FlowCrudServiceInMemory flowCrudServiceInMemory() { - return new FlowCrudServiceInMemory(); - } - - @Bean - public LicenseCrudServiceInMemory licenseCrudServiceInMemory() { - return new LicenseCrudServiceInMemory(); - } - - @Bean - public AuditQueryServiceInMemory auditQueryServiceInMemory(AuditCrudServiceInMemory auditCrudServiceInMemory) { - return new AuditQueryServiceInMemory(auditCrudServiceInMemory); - } - - @Bean - public AuditMetadataQueryServiceInMemory auditMetadataQueryServiceInMemory() { - return new AuditMetadataQueryServiceInMemory(); - } - - @Bean - public EventQueryServiceInMemory eventQueryService() { - return new EventQueryServiceInMemory(); - } - - @Bean - public GroupQueryServiceInMemory groupQueryService() { - return new GroupQueryServiceInMemory(); - } - - @Bean - public MembershipQueryServiceInMemory membershipQueryServiceInMemory() { - return new MembershipQueryServiceInMemory(); - } - - @Bean - public RoleQueryServiceInMemory roleQueryServiceInMemory() { - return new RoleQueryServiceInMemory(); - } - - @Bean - public IndexerInMemory indexer() { - return new IndexerInMemory(); - } - - @Bean - public MembershipCrudServiceInMemory membershipCrudServiceInMemory() { - return new MembershipCrudServiceInMemory(); - } -} diff --git a/gravitee-apim-rest-api/gravitee-apim-rest-api-management/gravitee-apim-rest-api-management-rest/src/test/java/io/gravitee/rest/api/management/rest/spring/ResourceContextConfiguration.java b/gravitee-apim-rest-api/gravitee-apim-rest-api-management/gravitee-apim-rest-api-management-rest/src/test/java/io/gravitee/rest/api/management/rest/spring/ResourceContextConfiguration.java index 93a3f2d0d60..08735ba4433 100644 --- a/gravitee-apim-rest-api/gravitee-apim-rest-api-management/gravitee-apim-rest-api-management-rest/src/test/java/io/gravitee/rest/api/management/rest/spring/ResourceContextConfiguration.java +++ b/gravitee-apim-rest-api/gravitee-apim-rest-api-management/gravitee-apim-rest-api-management-rest/src/test/java/io/gravitee/rest/api/management/rest/spring/ResourceContextConfiguration.java @@ -18,6 +18,7 @@ import static org.mockito.Mockito.mock; import com.fasterxml.jackson.databind.ObjectMapper; +import inmemory.spring.InMemoryConfiguration; import io.gravitee.apim.core.access_point.query_service.AccessPointQueryService; import io.gravitee.apim.core.api.domain_service.ApiMetadataDecoderDomainService; import io.gravitee.apim.core.api.domain_service.ApiMetadataDomainService; diff --git a/gravitee-apim-rest-api/gravitee-apim-rest-api-portal/gravitee-apim-rest-api-portal-rest/src/test/java/io/gravitee/rest/api/portal/rest/spring/ResourceContextConfiguration.java b/gravitee-apim-rest-api/gravitee-apim-rest-api-portal/gravitee-apim-rest-api-portal-rest/src/test/java/io/gravitee/rest/api/portal/rest/spring/ResourceContextConfiguration.java index 6e11cbd7098..9ade1645cb2 100644 --- a/gravitee-apim-rest-api/gravitee-apim-rest-api-portal/gravitee-apim-rest-api-portal-rest/src/test/java/io/gravitee/rest/api/portal/rest/spring/ResourceContextConfiguration.java +++ b/gravitee-apim-rest-api/gravitee-apim-rest-api-portal/gravitee-apim-rest-api-portal-rest/src/test/java/io/gravitee/rest/api/portal/rest/spring/ResourceContextConfiguration.java @@ -18,6 +18,7 @@ import static org.mockito.Mockito.mock; import com.fasterxml.jackson.databind.ObjectMapper; +import inmemory.spring.InMemoryConfiguration; import io.gravitee.apim.core.access_point.query_service.AccessPointQueryService; import io.gravitee.apim.core.api.domain_service.ApiMetadataDecoderDomainService; import io.gravitee.apim.core.api.domain_service.ApiMetadataDomainService; diff --git a/gravitee-apim-rest-api/gravitee-apim-rest-api-portal/gravitee-apim-rest-api-portal-rest/src/test/java/io/gravitee/rest/api/portal/rest/spring/InMemoryConfiguration.java b/gravitee-apim-rest-api/gravitee-apim-rest-api-service/src/test/java/inmemory/spring/InMemoryConfiguration.java similarity index 65% rename from gravitee-apim-rest-api/gravitee-apim-rest-api-portal/gravitee-apim-rest-api-portal-rest/src/test/java/io/gravitee/rest/api/portal/rest/spring/InMemoryConfiguration.java rename to gravitee-apim-rest-api/gravitee-apim-rest-api-service/src/test/java/inmemory/spring/InMemoryConfiguration.java index 72e9d46167f..5253c92f389 100644 --- a/gravitee-apim-rest-api/gravitee-apim-rest-api-portal/gravitee-apim-rest-api-portal-rest/src/test/java/io/gravitee/rest/api/portal/rest/spring/InMemoryConfiguration.java +++ b/gravitee-apim-rest-api/gravitee-apim-rest-api-service/src/test/java/inmemory/spring/InMemoryConfiguration.java @@ -13,11 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.gravitee.rest.api.portal.rest.spring; +package inmemory.spring; +import inmemory.AccessPointQueryServiceInMemory; import inmemory.ApiCrudServiceInMemory; import inmemory.ApiKeyCrudServiceInMemory; import inmemory.ApiKeyQueryServiceInMemory; +import inmemory.ApiMetadataQueryServiceInMemory; import inmemory.ApiQueryServiceInMemory; import inmemory.ApplicationCrudServiceInMemory; import inmemory.AuditCrudServiceInMemory; @@ -32,6 +34,7 @@ import inmemory.FlowCrudServiceInMemory; import inmemory.GroupQueryServiceInMemory; import inmemory.IndexerInMemory; +import inmemory.InstallationAccessQueryServiceInMemory; import inmemory.InstanceQueryServiceInMemory; import inmemory.LicenseCrudServiceInMemory; import inmemory.MembershipCrudServiceInMemory; @@ -40,6 +43,7 @@ import inmemory.PageCrudServiceInMemory; import inmemory.PageQueryServiceInMemory; import inmemory.PageRevisionCrudServiceInMemory; +import inmemory.ParametersDomainServiceInMemory; import inmemory.ParametersQueryServiceInMemory; import inmemory.PlanCrudServiceInMemory; import inmemory.PlanQueryServiceInMemory; @@ -49,9 +53,8 @@ import inmemory.SubscriptionQueryServiceInMemory; import inmemory.TriggerNotificationDomainServiceInMemory; import inmemory.UserCrudServiceInMemory; -import io.gravitee.apim.core.environment.crud_service.EnvironmentCrudService; -import io.gravitee.apim.core.event.crud_service.EventCrudService; -import io.gravitee.apim.core.gateway.query_service.InstanceQueryService; +import io.gravitee.apim.infra.query_service.audit.AuditEventQueryServiceImpl; +import org.mockito.Mockito; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -59,145 +62,170 @@ public class InMemoryConfiguration { @Bean - public ApplicationCrudServiceInMemory applicationRepository() { - return new ApplicationCrudServiceInMemory(); + public ApiQueryServiceInMemory apiQueryService() { + return new ApiQueryServiceInMemory(); } @Bean - public ConnectionLogsCrudServiceInMemory connectionLogRepository() { - return new ConnectionLogsCrudServiceInMemory(); + public ApiCrudServiceInMemory apiCrudService() { + return new ApiCrudServiceInMemory(); } @Bean - public MessageLogCrudServiceInMemory messageLogRepository() { - return new MessageLogCrudServiceInMemory(); + public ApiMetadataQueryServiceInMemory apiMetadataQueryService() { + return new ApiMetadataQueryServiceInMemory(); } @Bean - public PlanCrudServiceInMemory planCrudServiceInMemory() { - return new PlanCrudServiceInMemory(); + public ApplicationCrudServiceInMemory applicationRepository() { + return new ApplicationCrudServiceInMemory(); } @Bean - public PlanQueryServiceInMemory planQueryServiceInMemory() { - return new PlanQueryServiceInMemory(); + public ApiKeyCrudServiceInMemory apiKeyCrudService() { + return Mockito.spy(new ApiKeyCrudServiceInMemory()); } @Bean - public EnvironmentCrudService environmentCrudService() { - return new EnvironmentCrudServiceInMemory(); + public ApiKeyQueryServiceInMemory apiKeyQueryService(ApiKeyCrudServiceInMemory apiKeyCrudService) { + return new ApiKeyQueryServiceInMemory(apiKeyCrudService); } @Bean - ApiQueryServiceInMemory apiQueryServiceInMemory() { - return new ApiQueryServiceInMemory(); + public AuditCrudServiceInMemory auditCrudService() { + return new AuditCrudServiceInMemory(); } @Bean - public ApiCrudServiceInMemory apiCrudServiceInMemory() { - return new ApiCrudServiceInMemory(); + public ConnectionLogsCrudServiceInMemory connectionLogRepository() { + return new ConnectionLogsCrudServiceInMemory(); } @Bean - AuditCrudServiceInMemory auditCrudServiceInMemory() { - return new AuditCrudServiceInMemory(); + public EnvironmentCrudServiceInMemory environmentCrudService() { + return new EnvironmentCrudServiceInMemory(); } @Bean - UserCrudServiceInMemory userCrudServiceInMemory() { - return new UserCrudServiceInMemory(); + public MessageLogCrudServiceInMemory messageLogRepository() { + return new MessageLogCrudServiceInMemory(); } @Bean - SubscriptionCrudServiceInMemory subscriptionCrudServiceInMemory() { - return new SubscriptionCrudServiceInMemory(); + public PlanCrudServiceInMemory planCrudService() { + return new PlanCrudServiceInMemory(); } @Bean - SubscriptionQueryServiceInMemory subscriptionQueryServiceInMemory(SubscriptionCrudServiceInMemory subscriptionCrudServiceInMemory) { - return new SubscriptionQueryServiceInMemory(subscriptionCrudServiceInMemory); + public PlanQueryServiceInMemory planQueryService(PlanCrudServiceInMemory planCrudService) { + return new PlanQueryServiceInMemory(planCrudService); } @Bean - ApiKeyCrudServiceInMemory apiKeyCrudServiceInMemory() { - return new ApiKeyCrudServiceInMemory(); + public SubscriptionCrudServiceInMemory subscriptionCrudService() { + return new SubscriptionCrudServiceInMemory(); } @Bean - ApiKeyQueryServiceInMemory apiKeyQueryServiceInMemory(ApiKeyCrudServiceInMemory apiKeyCrudServiceInMemory) { - return new ApiKeyQueryServiceInMemory(apiKeyCrudServiceInMemory); + public SubscriptionQueryServiceInMemory subscriptionQueryService(SubscriptionCrudServiceInMemory subscriptionCrudService) { + return new SubscriptionQueryServiceInMemory(subscriptionCrudService); } @Bean - TriggerNotificationDomainServiceInMemory triggerNotificationDomainServiceInMemory() { + TriggerNotificationDomainServiceInMemory triggerNotificationDomainService() { return new TriggerNotificationDomainServiceInMemory(); } @Bean - public PageQueryServiceInMemory pageQueryServiceInMemory() { + public UserCrudServiceInMemory userCrudService() { + return new UserCrudServiceInMemory(); + } + + @Bean + public PageQueryServiceInMemory pageQueryService() { return new PageQueryServiceInMemory(); } @Bean - public PageCrudServiceInMemory pageCrudServiceInMemory() { + public PageCrudServiceInMemory pageCrudService() { return new PageCrudServiceInMemory(); } @Bean - public PageRevisionCrudServiceInMemory pageRevisionCrudServiceInMemory() { + public PageRevisionCrudServiceInMemory pageRevisionCrudService() { return new PageRevisionCrudServiceInMemory(); } @Bean - public InstanceQueryService instanceQueryService() { + public AccessPointQueryServiceInMemory accessPointQueryService() { + return new AccessPointQueryServiceInMemory(); + } + + @Bean + public InstallationAccessQueryServiceInMemory installationAccessService() { + return new InstallationAccessQueryServiceInMemory(); + } + + @Bean + public ParametersDomainServiceInMemory parametersDomainService() { + return new ParametersDomainServiceInMemory(); + } + + @Bean + public InstanceQueryServiceInMemory instanceQueryService() { return new InstanceQueryServiceInMemory(); } @Bean - public EventCrudService eventCrudService() { + public EventCrudInMemory eventCrudService() { return new EventCrudInMemory(); } @Bean - public ParametersQueryServiceInMemory parametersQueryServiceInMemory() { + public ParametersQueryServiceInMemory parametersQueryService() { return new ParametersQueryServiceInMemory(); } @Bean - public EntrypointPluginQueryServiceInMemory entrypointPluginQueryServiceInMemory() { + public EntrypointPluginQueryServiceInMemory entrypointPluginQueryService() { return new EntrypointPluginQueryServiceInMemory(); } @Bean - public EndpointPluginQueryServiceInMemory endpointPluginQueryServiceInMemory() { + public EndpointPluginQueryServiceInMemory endpointPluginQueryService() { return new EndpointPluginQueryServiceInMemory(); } @Bean - public PolicyPluginQueryServiceInMemory policyPluginQueryServiceInMemory() { + public PolicyPluginQueryServiceInMemory policyPluginQueryService() { return new PolicyPluginQueryServiceInMemory(); } @Bean - public FlowCrudServiceInMemory flowCrudServiceInMemory() { + public FlowCrudServiceInMemory flowCrudService() { return new FlowCrudServiceInMemory(); } @Bean - public LicenseCrudServiceInMemory licenseCrudServiceInMemory() { + public LicenseCrudServiceInMemory licenseCrudService() { return new LicenseCrudServiceInMemory(); } @Bean - public AuditQueryServiceInMemory auditQueryServiceInMemory(AuditCrudServiceInMemory auditCrudServiceInMemory) { + public AuditQueryServiceInMemory auditQueryService(AuditCrudServiceInMemory auditCrudServiceInMemory) { return new AuditQueryServiceInMemory(auditCrudServiceInMemory); } @Bean - public AuditMetadataQueryServiceInMemory auditMetadataQueryServiceInMemory() { + public AuditMetadataQueryServiceInMemory auditMetadataQueryService() { return new AuditMetadataQueryServiceInMemory(); } + @Bean + public AuditEventQueryServiceImpl auditEventQueryService() { + return new AuditEventQueryServiceImpl(); + } + @Bean public EventQueryServiceInMemory eventQueryService() { return new EventQueryServiceInMemory(); @@ -209,22 +237,22 @@ public GroupQueryServiceInMemory groupQueryService() { } @Bean - public MembershipQueryServiceInMemory membershipQueryServiceInMemory() { - return new MembershipQueryServiceInMemory(); + public MembershipCrudServiceInMemory membershipCrudService() { + return new MembershipCrudServiceInMemory(); } @Bean - public RoleQueryServiceInMemory roleQueryServiceInMemory() { - return new RoleQueryServiceInMemory(); + public MembershipQueryServiceInMemory membershipQueryService(MembershipCrudServiceInMemory membershipCrudService) { + return new MembershipQueryServiceInMemory(membershipCrudService); } @Bean - public IndexerInMemory indexer() { - return new IndexerInMemory(); + public RoleQueryServiceInMemory roleQueryService() { + return new RoleQueryServiceInMemory(); } @Bean - public MembershipCrudServiceInMemory membershipCrudServiceInMemory() { - return new MembershipCrudServiceInMemory(); + public IndexerInMemory indexer() { + return new IndexerInMemory(); } }