static BigtableReadOptions translateToBigtableReadOptions(
      BigtableReadOptions readOptions, BigtableOptions options) {
    BigtableReadOptions.Builder builder = readOptions.toBuilder();
    builder.setWaitTimeout(
        org.joda.time.Duration.millis(options.getRetryOptions().getReadPartialRowTimeoutMillis()));
    if (options.getCallOptionsConfig().getReadStreamRpcAttemptTimeoutMs().isPresent()) {
      builder.setAttemptTimeout(
          org.joda.time.Duration.millis(
              options.getCallOptionsConfig().getReadStreamRpcAttemptTimeoutMs().get()));
    }
    builder.setOperationTimeout(
        org.joda.time.Duration.millis(options.getCallOptionsConfig().getReadStreamRpcTimeoutMs()));
    return builder.build();
  }
@Test
  public void testBigtableOptionsToBigtableReadOptions() throws Exception {
    BigtableOptions options =
        BigtableOptions.builder()
            .setCallOptionsConfig(
                CallOptionsConfig.builder()
                    .setReadRowsRpcAttemptTimeoutMs(100)
                    .setReadRowsRpcTimeoutMs(1000)
                    .build())
            .setRetryOptions(
                RetryOptions.builder().setInitialBackoffMillis(5).setBackoffMultiplier(1.5).build())
            .build();

    BigtableReadOptions readOptions =
        BigtableReadOptions.builder()
            .setTableId(ValueProvider.StaticValueProvider.of("table"))
            .build();
    BigtableReadOptions fromBigtableOptions =
        BigtableConfigTranslator.translateToBigtableReadOptions(readOptions, options);

    assertNotNull(fromBigtableOptions.getAttemptTimeout());
    assertNotNull(fromBigtableOptions.getOperationTimeout());

    assertEquals(org.joda.time.Duration.millis(100), fromBigtableOptions.getAttemptTimeout());
    assertEquals(org.joda.time.Duration.millis(1000), fromBigtableOptions.getOperationTimeout());
  }