@Test
public void shouldUpdateBackfillConcurrency() throws Exception {

  final EditableBackfillInput backfillInput = EditableBackfillInput.newBuilder()
      .id(BACKFILL.id())
      .concurrency(4)
      .build();
  when(client.send(any(Request.class)))
      .thenReturn(CompletableFuture.completedFuture(
          response(HTTP_OK, BACKFILL.builder().concurrency(4).build())));
  final CompletableFuture<Backfill> r = styx.backfillEditConcurrency(BACKFILL.id(), 4)
      .toCompletableFuture();
  verify(client, timeout(30_000)).send(requestCaptor.capture());
  assertThat(r.isDone(), is(true));
  final Request request = requestCaptor.getValue();
  assertThat(request.url().toString(), is(API_URL + "/backfills/" + BACKFILL.id()));
  assertThat(Json.deserialize(bytesOfRequestBody(request), EditableBackfillInput.class),
      equalTo(backfillInput));
  assertThat(request.method(), is("PUT"));
}