title: How to inject mapper (mapstruct) to Junit test with SpringJUnit4ClassRunner
body: <p>I have problems with configuring tests for SpringJUnit4ClassRunner.class).
  My problem is because my mapper from map struct returns null when reached.</p>
  
  <pre><code>@RunWith(SpringJUnit4ClassRunner.class)
  @SpringBootTest
  class UserServiceTestSuite {
      @Spy
      private UserDto userDto;
      @Spy
      private UserMapper userMapper;
      @Mock
      private UserRepository userRepository;
      @InjectMocks
      private UserService userService;
  
      private User createUser() {
          return User.builder()
                  .firstName("Steve")
                  .lastName("Jobs")
                  .login("SteveJobs")
                  .password("password")
                  .role(UserRole.ROLE_ADMIN)
                  .build();
  
      }
  
      @Test
      public void testCreateUser() {
          //Given
          User user = createUser();
          Mockito.when(userRepository.save(user)).thenReturn(user);
          //When
          UserDto userDto = userService.createUser(userMapper.mapToUserDto(user));
          Long id = userDto.getId();
          //Then
          Assert.assertEquals("Steve", userDto.getFirstName());
          Assert.assertEquals("Jobs", userDto.getLastName());
          Assert.assertEquals("SteveJobs", userDto.getLogin());
          Assert.assertEquals("ROLE_ADMIN", userDto.getRole());
      }
  </code></pre>