QueryProcessor { public <T> List<Property<T>> process(Query query, T instance, Class<T> instanceClazz) { preProcess(query, instance, instanceClazz); List<Property<T>> properties = processInternal(query, instance, instanceClazz); postProcess(properties, query, instance, instanceClazz); return properties; }  abstract boolean supports(Class<? extends Query<?>> query); List<Property<T>> process(Query query, T instance, Class<T> instanceClazz);  }
@Test public void validateProcessOrder() { MockQueryProcessor processor = new MockQueryProcessor(); processor.process(null, new MockModel(), MockModel.class); assertEquals("preProcess", processor.getProcessOrder().get(0)); assertEquals("processInternal", processor.getProcessOrder().get(1)); assertEquals("postProcess", processor.getProcessOrder().get(2)); }