public static Write write() {
    return new AutoValue_RedisIO_Write.Builder()
        .setConnectionConfiguration(RedisConnectionConfiguration.create())
        .setMethod(Write.Method.APPEND)
        .build();
  }
@Test
  public void testWriteUsingINCRBY() {
    String key = "key_incr";
    List<String> values = Arrays.asList("0", "1", "2", "-3", "2", "4", "0", "5");
    List<KV<String, String>> data = buildConstantKeyList(key, values);

    PCollection<KV<String, String>> write = p.apply(Create.of(data));
    write.apply(RedisIO.write().withEndpoint(REDIS_HOST, port).withMethod(Method.INCRBY));

    p.run();

    long count = Long.parseLong(client.get(key));
    assertEquals(11, count);
  }