@Test (enabled = false) public void testDelete_invalidId() { boolean isException = false; Customer customerIn = new Customer(); customerIn.setId("NG:111"); try { Customer customerOut = service.delete(customerIn); if (customerOut == null) { isException = true; } } catch (FMSException e) { isException = true; } Assert.assertTrue(isException); }
@SuppressWarnings("unchecked") public <T extends IEntity> T delete(T entity) throws FMSException { verifyEntity(entity); IntuitMessage intuitMessage = prepareDelete(entity); executeInterceptors(intuitMessage); return (T) retrieveEntity(intuitMessage); }
DataService { @SuppressWarnings("unchecked") public <T extends IEntity> T delete(T entity) throws FMSException { verifyEntity(entity); IntuitMessage intuitMessage = prepareDelete(entity); executeInterceptors(intuitMessage); return (T) retrieveEntity(intuitMessage); } }
DataService { @SuppressWarnings("unchecked") public <T extends IEntity> T delete(T entity) throws FMSException { verifyEntity(entity); IntuitMessage intuitMessage = prepareDelete(entity); executeInterceptors(intuitMessage); return (T) retrieveEntity(intuitMessage); } protected  DataService();  DataService(final Context context); }
DataService { @SuppressWarnings("unchecked") public <T extends IEntity> T delete(T entity) throws FMSException { verifyEntity(entity); IntuitMessage intuitMessage = prepareDelete(entity); executeInterceptors(intuitMessage); return (T) retrieveEntity(intuitMessage); } protected  DataService();  DataService(final Context context); @SuppressWarnings("unchecked") List<T> findAll(T entity); @SuppressWarnings("unchecked") QueryResult findAllTaxClassification(); @SuppressWarnings("unchecked") T add(T entity); @SuppressWarnings("unchecked") T delete(T entity); @SuppressWarnings("unchecked") T update(T entity); @SuppressWarnings("unchecked") T updateAccountOnTxns(T entity); @SuppressWarnings("unchecked") T donotUpdateAccountOnTxns(T entity); @SuppressWarnings("unchecked") T findById(T entity); @SuppressWarnings("unchecked") QueryResult findTaxClassificationByParentId(IEntity entity); @SuppressWarnings("unchecked") QueryResult findTaxClassificationByLevel(IEntity entity); @SuppressWarnings("unchecked") T voidRequest(T entity); @SuppressWarnings("unchecked") T upload(T entity, InputStream docContent); List<T> upload(List<UploadEntry> entries); InputStream download(T entity); InputStream downloadPDF(T entity); T sendEmail(T entity); @SuppressWarnings("unchecked") T sendEmail(T entity, String email); boolean isAvailableAsPDF(T entity); boolean isAvailableToEmail(T entity); QueryResult executeQuery(String query); List<CDCQueryResult> executeCDCQuery(List<? extends IEntity> entities, String changedSince); void executeBatch(BatchOperation batchOperation); void findAllAsync(T entity, CallbackHandler callbackHandler); void addAsync(T entity, CallbackHandler callbackHandler); void deleteAsync(T entity, CallbackHandler callbackHandler); void updateAsync(T entity, CallbackHandler callbackHandler); void findByIdAsync(T entity, CallbackHandler callbackHandler); void voidRequestAsync(T entity, CallbackHandler callbackHandler); void uploadAsync(T entity, InputStream docContent, CallbackHandler callbackHandler); void downloadAsync(T entity, CallbackHandler callbackHandler); void downloadPDFAsync(T entity, CallbackHandler callbackHandler); void sendEmailAsync(T entity, CallbackHandler callbackHandler); void sendEmailAsync(T entity, String email, CallbackHandler callbackHandler); void executeQueryAsync(String query, CallbackHandler callbackHandler); void executeCDCQueryAsync(List<? extends IEntity> entities, String changedSince, CallbackHandler callbackHandler); EntitlementsResponse getEntitlements(); void executeBatchAsync(BatchOperation batchOperation, CallbackHandler callbackHandler); }
DataService { @SuppressWarnings("unchecked") public <T extends IEntity> T delete(T entity) throws FMSException { verifyEntity(entity); IntuitMessage intuitMessage = prepareDelete(entity); executeInterceptors(intuitMessage); return (T) retrieveEntity(intuitMessage); } protected  DataService();  DataService(final Context context); @SuppressWarnings("unchecked") List<T> findAll(T entity); @SuppressWarnings("unchecked") QueryResult findAllTaxClassification(); @SuppressWarnings("unchecked") T add(T entity); @SuppressWarnings("unchecked") T delete(T entity); @SuppressWarnings("unchecked") T update(T entity); @SuppressWarnings("unchecked") T updateAccountOnTxns(T entity); @SuppressWarnings("unchecked") T donotUpdateAccountOnTxns(T entity); @SuppressWarnings("unchecked") T findById(T entity); @SuppressWarnings("unchecked") QueryResult findTaxClassificationByParentId(IEntity entity); @SuppressWarnings("unchecked") QueryResult findTaxClassificationByLevel(IEntity entity); @SuppressWarnings("unchecked") T voidRequest(T entity); @SuppressWarnings("unchecked") T upload(T entity, InputStream docContent); List<T> upload(List<UploadEntry> entries); InputStream download(T entity); InputStream downloadPDF(T entity); T sendEmail(T entity); @SuppressWarnings("unchecked") T sendEmail(T entity, String email); boolean isAvailableAsPDF(T entity); boolean isAvailableToEmail(T entity); QueryResult executeQuery(String query); List<CDCQueryResult> executeCDCQuery(List<? extends IEntity> entities, String changedSince); void executeBatch(BatchOperation batchOperation); void findAllAsync(T entity, CallbackHandler callbackHandler); void addAsync(T entity, CallbackHandler callbackHandler); void deleteAsync(T entity, CallbackHandler callbackHandler); void updateAsync(T entity, CallbackHandler callbackHandler); void findByIdAsync(T entity, CallbackHandler callbackHandler); void voidRequestAsync(T entity, CallbackHandler callbackHandler); void uploadAsync(T entity, InputStream docContent, CallbackHandler callbackHandler); void downloadAsync(T entity, CallbackHandler callbackHandler); void downloadPDFAsync(T entity, CallbackHandler callbackHandler); void sendEmailAsync(T entity, CallbackHandler callbackHandler); void sendEmailAsync(T entity, String email, CallbackHandler callbackHandler); void executeQueryAsync(String query, CallbackHandler callbackHandler); void executeCDCQueryAsync(List<? extends IEntity> entities, String changedSince, CallbackHandler callbackHandler); EntitlementsResponse getEntitlements(); void executeBatchAsync(BatchOperation batchOperation, CallbackHandler callbackHandler);  }