@Test public void createsClient() throws Exception {

  CreateClientRequestV2 request = CreateClientRequestV2.builder()
      .name("new-client-name")
      .description("description")
      .spiffeId("spiffe//example.org/new-client-name")
      .build();
  when(clientDAO.createClient("new-client-name", "user", "description",
      new URI("spiffe//example.org/new-client-name"))).thenReturn(42L);
  when(clientDAO.getClientById(42L)).thenReturn(Optional.of(client));
  when(aclDAO.getSanitizedSecretsFor(client)).thenReturn(ImmutableSet.of());
  Response response = resource.createClient(user, request);
  assertThat(response.getStatus()).isEqualTo(201);
}