I've seen lots of questions around unit testing automapper 'map' but how do you mock 'MapTo'. This expects an IMapper as it's object. So, this is what I have so far:

```
private Mock<IMapper> _mapper;

[TestInitialize]
public void Init()
{
    _mapper = new Mock<IMapper>();

    //other stuff initialised.
}

[TestMethod]
public void MyTest()
{
    _mapper.Setup(m => m.MapTo<IList<Something>>(_mapper.Object)).Returns(myList);

    //setup repository etc.
}

```

This throws an error of "Invalid setup on an extension method...". So, how do I mock out the call to 'MapTo'?

Just to clarify, I know I can use an actual version of the mapper and create actual maps like:

```
private MapperConfiguration CreateMaps()
{
    return new MapperConfiguration(mc =>
   {
       mc.CreateMap<MyEntity, MyObject>();
       mc.CreateMap<MyOtherEntity, MyOtherObject>();
   });
}

_mapper = new Mapper(CreateMaps());

```

However, I was still curious how to mock it. It seems an easy thing to do with Map but not MapTo