### Question:
CustomUserInfoEngineClient { public void deleteDefinition(long id) { try { identity.deleteCustomUserInfoDefinition(id); } catch (DeletionException e) { throw new APIException(new _("An error occurred while deleting an item with the id %id%", new Arg("id", id)), e); } } CustomUserInfoEngineClient(IdentityAPI identity); CustomUserInfoDefinition createDefinition(CustomUserInfoDefinitionCreator creator); void deleteDefinition(long id); List<CustomUserInfoDefinition> listDefinitions(int startIndex, int maxResult); long countDefinitions(); List<CustomUserInfo> listCustomInformation(long userId, int startIndex, int maxResult); SearchResult<CustomUserInfoValue> searchCustomUserInfoValues(SearchOptions options); CustomUserInfoValue setCustomUserInfoValue(long definitionId, long userId, String value);  }### Answer:
@Test public void should_delete_a_given_definition() throws Exception { client.deleteDefinition(1L); verify(engine).deleteCustomUserInfoDefinition(1L); }
@Test(expected = APIException.class) public void should_fail_to_delete_a_given_definition_when_engine_throw_an_exception() throws Exception { willThrow(new DeletionException("failure")).given(engine) .deleteCustomUserInfoDefinition(1L); client.deleteDefinition(1L); }