### Question:
HabitFactServiceImpl implements HabitFactService { @Override public HabitFact save(HabitFactPostDTO fact) { return habitFactRepo.save(modelMapper.map(fact, HabitFact.class)); } @Autowired  HabitFactServiceImpl(ModelMapper modelMapper, HabitFactRepo habitFactRepo,
                                HabitDictionaryRepo habitDictionaryRepo, FactTranslationRepo factTranslationRepo); @Override List<LanguageTranslationDTO> getAllHabitFacts(); @Override LanguageTranslationDTO getRandomHabitFactByHabitIdAndLanguage(Long id, String language); @Override HabitFactDTO getHabitFactById(Long id); @Override HabitFactDTO getHabitFactByName(String language, String name); @Override HabitFact save(HabitFactPostDTO fact); @Override HabitFact update(HabitFactPostDTO fact, Long id); @Override Long delete(Long id);  }### Answer:
@Test public void save() { when(habitFactService.save(habitFactPostDTO)).thenReturn(habitFact); assertEquals(habitFact, habitFactService.save(habitFactPostDTO)); }