Reduce compilation time and unneccessary recompiles by removing unused includes in tests.
A subset of #16273 (“refactor: Reduce total compilation time by 2% and avoid unnecessary recompiles by removing unused includes”) as requested by MarcoFalke in #16273 (comment).