### Question:
AbstractCrudController { @NonNull public ResponseEntity delete(@NonNull final ID id) { if (service.delete(id)) { return ResponseEntity.noContent().build(); } else { return ResponseEntity.notFound().build(); } } AbstractCrudController(@NonNull final CrudService<T, ID, Q, S> service); @NonNull ResponseEntity<S> create(@NonNull final Q request); @NonNull ResponseEntity<S> update(@NonNull final ID id, @NonNull final Q request); @NonNull ResponseEntity delete(@NonNull final ID id); @NonNull ResponseEntity<S> getOne(@NonNull final ID id); @NonNull ResponseEntity<Page<S>> getAll(@NonNull final Pageable pageable); @NonNull ResponseEntity<List<S>> getAll(@NonNull final Sort sort); @NonNull ResponseEntity<List<S>> getAll();  }### Answer:
@Test public void deleteOne() throws Exception { mvc.perform(delete(MODELS + "/{id}", 1)) .andExpect(status().isNoContent()) .andExpect(jsonPath("$").doesNotExist()); mvc.perform(delete("/tests/{id}", 0)) .andExpect(status().isNotFound()) .andExpect(jsonPath("$").doesNotExist()); }