### Question:
MongoPersister extends AbstractPersister<T, StateDocumentImpl> implements
				Persister<T>,
				BeanDefinitionRegistryPostProcessor,
				ApplicationContextAware { protected StateDocumentImpl getStateDocument(T stateful) throws IllegalArgumentException, IllegalAccessException { Object stateDoc = getStateField().get(stateful); if (stateDoc instanceof LazyLoadingProxy) { stateDoc = ((LazyLoadingProxy)stateDoc).getTarget(); } return (StateDocumentImpl)stateDoc; } MongoPersister(
			List<State<T>> states,
			State<T> startState,
			Class<T> clazz,
			MongoTemplate mongoTemplate);  MongoPersister(
			List<State<T>> states,
			String stateFieldName,
			State<T> startState,
			Class<T> clazz,
			MongoTemplate mongoTemplate);  MongoPersister(
			List<State<T>> states,
			State<T> startState,
			Class<T> clazz,
			String repoId);  MongoPersister(
			List<State<T>> states,
			String stateFieldName,
			State<T> startState,
			Class<T> clazz,
			String repoId); @Override void setApplicationContext(ApplicationContext applicationContext); @Override void setCurrent(T stateful, State<T> current, State<T> next); @Override void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory); @Override void postProcessBeanDefinitionRegistry(
			BeanDefinitionRegistry registry);  }### Answer:
@Test public void testDeleteCascadeSupport() throws StaleStateException { Order order = new Order(); order.setAmount(20); order = orderRepo.save(order); String orderId = order.getId(); String stateId = order.getStateDocument().getId(); order = orderRepo.findOne(orderId); assertNotNull(order); StateDocument state = this.mongoTemplate.findById(stateId, StateDocumentImpl.class); assertNotNull(state); orderRepo.delete(order); order = orderRepo.findOne(orderId); assertNull(order); state = this.mongoTemplate.findById(stateId, StateDocumentImpl.class); assertNull(state); }