use of com.datastax.oss.protocol.internal.request.Startup in project java-driver by datastax.
the class DseStartupOptionsBuilderTest method should_build_startup_options_with_client_id.
@Test
public void should_build_startup_options_with_client_id() {
when(defaultProfile.getString(DefaultDriverOption.PROTOCOL_COMPRESSION, "none")).thenReturn("none");
UUID customClientId = Uuids.random();
buildContext(customClientId, null, null);
Startup startup = new Startup(driverContext.getStartupOptions());
// assert the client id is present
assertThat(startup.options).containsEntry(StartupOptionsBuilder.CLIENT_ID_KEY, customClientId.toString());
assertThat(startup.options).doesNotContainKey(Startup.COMPRESSION_KEY);
assertThat(startup.options).doesNotContainKey(StartupOptionsBuilder.APPLICATION_NAME_KEY);
assertThat(startup.options).doesNotContainKey(StartupOptionsBuilder.APPLICATION_VERSION_KEY);
assertDefaultStartupOptions(startup);
}
Aggregations