@Override
public Response apply(ContainerRequestContext containerRequestContext) {
final RuntimeResource resource = extendedUriInfo.getMatchedRuntimeResources().get(0);
// TODO: support multiple resources, see ignored tests in WadlResourceTest.Wadl8Test
final UriInfo uriInfo = containerRequestContext.getUriInfo();
final Application wadlApplication = wadlApplicationContext.getApplication(uriInfo,
resource.getResources().get(0), WadlUtils.isDetailedWadlRequested(uriInfo));
if (wadlApplication == null) {
// wadlApplication can be null if limited WADL is requested and all content
// of wadlApplication is invisible in limited WADL
return Response.status(Response.Status.NOT_FOUND).build();