Unit tests for image loader