Add tests for scalar reference key output