diff --git a/server/src/test/java/com/hedera/block/server/config/ConfigInjectionModuleTest.java b/server/src/test/java/com/hedera/block/server/config/ConfigInjectionModuleTest.java index 898fe0b7..5d2f5882 100644 --- a/server/src/test/java/com/hedera/block/server/config/ConfigInjectionModuleTest.java +++ b/server/src/test/java/com/hedera/block/server/config/ConfigInjectionModuleTest.java @@ -18,6 +18,7 @@ import static org.junit.jupiter.api.Assertions.*; +import com.hedera.block.server.ServerConfig; import com.hedera.block.server.consumer.ConsumerConfig; import com.hedera.block.server.mediator.MediatorConfig; import com.hedera.block.server.notifier.NotifierConfig; @@ -36,12 +37,10 @@ void testProvidePersistenceStorageConfig() throws IOException { BlockNodeContext context = TestConfigUtil.getTestBlockNodeContext(); Configuration configuration = context.configuration(); - PersistenceStorageConfig persistenceStorageConfig = - configuration.getConfigData(PersistenceStorageConfig.class); + PersistenceStorageConfig persistenceStorageConfig = configuration.getConfigData(PersistenceStorageConfig.class); // Call the method under test - PersistenceStorageConfig providedConfig = - ConfigInjectionModule.providePersistenceStorageConfig(configuration); + PersistenceStorageConfig providedConfig = ConfigInjectionModule.providePersistenceStorageConfig(configuration); // Verify that the correct config data is returned assertNotNull(providedConfig); @@ -71,8 +70,7 @@ void testProvidePrometheusConfig() throws IOException { PrometheusConfig prometheusConfig = configuration.getConfigData(PrometheusConfig.class); // Call the method under test - PrometheusConfig providedConfig = - ConfigInjectionModule.providePrometheusConfig(configuration); + PrometheusConfig providedConfig = ConfigInjectionModule.providePrometheusConfig(configuration); // Verify that the correct config data is returned assertNotNull(providedConfig); @@ -119,4 +117,17 @@ void testProvideNotifierConfig() throws IOException { assertNotNull(providedConfig); assertSame(notifierConfig, providedConfig); } + + @Test + void testServerConfig() throws IOException { + BlockNodeContext context = TestConfigUtil.getTestBlockNodeContext(); + Configuration configuration = context.configuration(); + ServerConfig serverConfig = configuration.getConfigData(ServerConfig.class); + + ServerConfig providedConfig = ConfigInjectionModule.provideServerConfig(configuration); + + // Verify the config + assertNotNull(providedConfig); + assertSame(serverConfig, providedConfig); + } }