Tests for resource transformations, plus refactored WithId.