92939495969798
appCtx.publishEvent(new BeforeDeleteEvent(person)); } @Test(expected = RuntimeException.class) public void shouldDispatchAfterDelete() throws Exception { appCtx.publishEvent(new AfterDeleteEvent(person)); }
364365366367368369370371372
throw new ResourceNotFoundException(); } publisher.publishEvent(new BeforeDeleteEvent(domainObj)); invoker.invokeDelete(id); publisher.publishEvent(new AfterDeleteEvent(domainObj)); return new ResponseEntity<Object>(HttpStatus.NO_CONTENT); }