Add tests for loader