Add unit tests for the preload controller