### Question:
UserPreferencesServiceImpl implements UserPreferencesService { @Override public UserPreferences getUserPreferencesByNtId(String userNtId) throws PacManException { return userPreferencesRepository.findByUserIdIgnoreCase(userNtId); }  @Override UserPreferences getUserPreferencesByNtId(String userNtId);  }### Answer:
@Test public void getUserPreferencesByNtIdTest() throws PacManException { when(userPreferencesRepository.findByUserIdIgnoreCase("userId123")).thenReturn(getUserPreferencesByNtIdDetails()); assertThat(userPreferencesService.getUserPreferencesByNtId("userId123").getUserId(), is("userId123")); }