@Test
public void updateExecutions() throws Exception {

  final ImmutableMap<String, String> map = ImmutableMap.of("test", "response");
  when(this.client
      .httpPost(eq(new URI("http://executor-2:1234/executor")), this.params.capture()))
      .thenReturn(JSONUtils.toJSON(map));
  final Map<String, Object> response = this.gateway
      .updateExecutions(new Executor(2, "executor-2", 1234, true),
          Collections.singletonList(new ExecutableFlow()));
  assertEquals(map, response);
  assertEquals(new Pair<>("executionId", "[-1]"), this.params.getValue().get(0));
  assertEquals(new Pair<>("updatetime", "[-1]"), this.params.getValue().get(1));
  assertEquals(new Pair<>("action", "update"), this.params.getValue().get(2));
  assertEquals(new Pair<>("execid", "null"), this.params.getValue().get(3));
  assertEquals(new Pair<>("user", null), this.params.getValue().get(4));
}