@Test
public void onPOSTInitThenItSynchronouslyInitRaftService() throws Exception {

  CompletableFuture<Raft.StateType> future = CompletableFuture.completedFuture(Raft.StateType.START);
  when(raftService.init()).thenReturn(future);
  assertThat(client().target("/init").request().post(Entity.json("")).readEntity(Raft.StateType.class)).isEqualTo(
      Raft.StateType.START);
}