diff --git a/document-store/src/test/java/org/hypertrace/core/documentstore/model/config/MongoConnectionConfigTest.java b/document-store/src/test/java/org/hypertrace/core/documentstore/model/config/MongoConnectionConfigTest.java index cbdbcaf0..8e85f40f 100644 --- a/document-store/src/test/java/org/hypertrace/core/documentstore/model/config/MongoConnectionConfigTest.java +++ b/document-store/src/test/java/org/hypertrace/core/documentstore/model/config/MongoConnectionConfigTest.java @@ -9,6 +9,7 @@ import java.util.List; import java.util.concurrent.TimeUnit; import org.hypertrace.core.documentstore.model.config.mongo.MongoConnectionConfig; +import org.hypertrace.core.documentstore.model.options.DataFreshness; import org.junit.jupiter.api.Test; class MongoConnectionConfigTest { @@ -167,4 +168,16 @@ void testDefaultCredentials_shouldNotSetCredentials() { final MongoClientSettings actual = mongoConnectionConfig.toSettings(); assertEquals(expected, actual); } + + @Test + void testBuildWithDataFreshnessOption() { + final MongoConnectionConfig mongoConnectionConfig = + (MongoConnectionConfig) + ConnectionConfig.builder() + .type(DatabaseType.MONGO) + .dataFreshness(DataFreshness.NEAR_REALTIME_FRESHNESS) + .build(); + + assertEquals(DataFreshness.NEAR_REALTIME_FRESHNESS, mongoConnectionConfig.dataFreshness()); + } }