static <RequestT, @Nullable ResponseT>
      PTransform<PCollection<RequestT>, Result<KV<RequestT, @Nullable ResponseT>>> readUsingRedis(
          RedisClient client,
          Coder<RequestT> requestTCoder,
          Coder<@Nullable ResponseT> responseTCoder)
          throws NonDeterministicException {
    return read(
        new UsingRedis<>(requestTCoder, responseTCoder, client).read(),
        requestTCoder,
        responseTCoder);
  }
@Test
  public void givenNonDeterministicCoder_readUsingRedis_throwsError()
      throws Coder.NonDeterministicException {
    URI uri = URI.create("redis://localhost:6379");
    assertThrows(
        NonDeterministicException.class,
        () ->
            Cache.readUsingRedis(
                new RedisClient(uri),
                CallTest.NON_DETERMINISTIC_REQUEST_CODER,
                CallTest.DETERMINISTIC_RESPONSE_CODER));

    assertThrows(
        NonDeterministicException.class,
        () ->
            Cache.readUsingRedis(
                new RedisClient(uri),
                CallTest.DETERMINISTIC_REQUEST_CODER,
                CallTest.NON_DETERMINISTIC_RESPONSE_CODER));

    Cache.readUsingRedis(
        new RedisClient(uri),
        CallTest.DETERMINISTIC_REQUEST_CODER,
        CallTest.DETERMINISTIC_RESPONSE_CODER);
  }