During setup of SystemTestData GeoServerExtensions is not yet configured with an application context, so returns null for GeoServerResourceLoader.

I am basically doing this null check to workaround GeoServerExtensions not being reliable in any code called during SystemTestData. This mostly includes GeoTools factories ..

Note the test cases that depend on these factories call CRS reset after SystemTestData is defined in order to give these factories another kick at the can.