UserSettingsServiceImpl extends BaseServiceImpl<UserSettings> implements UserSettingsService { @Override public UserSettings getOrCreateByUser() { return getOrCreateByUser(userInstance.get()); }  @Override UserSettings get(String id); @Override UserSettings getById(UUID id); @Override UserSettings getByUser(); @Override UserSettings getByUser(HawkularUser user); @Override UserSettings getOrCreateByUser(); @Override UserSettings getOrCreateByUser(HawkularUser user); @Override String getSettingByKey(String key); @Override String getSettingByKey(String key, String defaultValue); @Override String getSettingByKey(HawkularUser user, String key); @Override String getSettingByKey(HawkularUser user, String key, String defaultValue); @Override UserSettings store(HawkularUser user, String key, String value); @Override UserSettings store(String key, String value); @Override UserSettings remove(HawkularUser user, String key); @Override UserSettings remove(String key); @Override @Produces @NamedSetting String produceSettingByName(InjectionPoint injectionPoint);  }
@Test public void createSettingsIfNoneExists() { HawkularUser user = userService.getOrCreateById(UUID.randomUUID().toString()); UserSettings settings = settingsService.getOrCreateByUser(user); assertTrue("The settings should be empty at this point.", settings.isEmpty()); }