use of com.datastax.oss.driver.internal.core.DefaultProtocolVersionRegistry in project java-driver by datastax.
the class StatementSizeTest method setup.
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
ByteBuffer preparedId = ByteBuffer.wrap(PREPARED_ID);
when(preparedStatement.getId()).thenReturn(preparedId);
ByteBuffer resultMetadataId = ByteBuffer.wrap(RESULT_METADATA_ID);
when(preparedStatement.getResultMetadataId()).thenReturn(resultMetadataId);
ColumnDefinitions columnDefinitions = DefaultColumnDefinitions.valueOf(ImmutableList.of(phonyColumnDef("ks", "table", "c1", -1, ProtocolConstants.DataType.INT), phonyColumnDef("ks", "table", "c2", -1, ProtocolConstants.DataType.VARCHAR)));
when(preparedStatement.getVariableDefinitions()).thenReturn(columnDefinitions);
when(driverContext.getProtocolVersion()).thenReturn(DefaultProtocolVersion.V5);
when(driverContext.getCodecRegistry()).thenReturn(CodecRegistry.DEFAULT);
when(driverContext.getProtocolVersionRegistry()).thenReturn(new DefaultProtocolVersionRegistry(null));
when(config.getDefaultProfile()).thenReturn(defaultProfile);
when(driverContext.getConfig()).thenReturn(config);
when(driverContext.getTimestampGenerator()).thenReturn(timestampGenerator);
}
Aggregations