@Test(expected = ConflictException.class)
public void triesToCreateDuplicateSecret() throws Exception {

  SecretController.SecretBuilder secretBuilder = mock(SecretController.SecretBuilder.class);
  when(secretController.builder("name", "content", user.getName(), 0)).thenReturn(secretBuilder);
  DataAccessException exception = new DataAccessException("");
  doThrow(exception).when(secretBuilder).create();
  CreateSecretRequestV2 req = CreateSecretRequestV2.builder()
      .name("name")
      .description("desc")
      .content("content")
      .build();
  resource.createSecret(user, req);
}