title: How to mock class which uses Map Struct in Java?
body: <p>Java class which uses MAPSTRUCT we have static variable INSTANCE inside interface and this interface implementation is created at runtime.So, how to mock class which uses Map Struct in Java?</p>
  
  <pre><code>    @Mapper 1
      public interface CarMapper {
  
          CarMapper INSTANCE = Mappers.getMapper( CarMapper.class ); 3
  
          @Mapping(source = "numberOfSeats", target = "seatCount")
          CarDto carToCarDto(Car car); 2
      }
  
  
      public class A
      {
          public CarDto getCardto()
          {
              CarDto carDto = CarMapper.INSTANCE.carToCarDto(car);
              return carDto;
          }
  
      }
  </code></pre>
  
  <p>How to create mock for class A?</p>