Tests and initial code structure for NestedQueryTransform