*
* @throws Exception
*/
@Test
public void testRunCoDependentInterceptors() throws Exception {
LayerResource resource=(LayerResource) layer.getGeoResources().get(0);
try{
resource.testingOnly_sort(new Comparator<IResourceInterceptor<? extends Object>>(){
public int compare( IResourceInterceptor< ? extends Object> o1, IResourceInterceptor< ? extends Object> o2 ) {
if( o1 instanceof TestInterceptorPost){
return -1;
}
if( o2 instanceof TestInterceptorPost){
return 1;
}
return 0;
}
}, false);
TestInterceptorPost.changeType=true;
NullProgressMonitor nullProgressMonitor = new NullProgressMonitor();
FeatureSource<SimpleFeatureType, SimpleFeature> resolve = resource.resolve(FeatureSource.class, nullProgressMonitor);
assertNotNull(resolve);
}finally{
TestInterceptorPost.changeType=false;
resource.testingOnly_sort(null, false);
}
}