UserPropertiesServiceV1Impl implements UserPropertiesService { @Override public int addStopBookmark(User user, String name, List<String> stopIds, RouteFilter filter) { UserPropertiesV1 properties = getProperties(user); if (!properties.isRememberPreferencesEnabled()) return -1; properties.getBookmarkedStopIds().addAll(stopIds); _userDao.saveOrUpdateUser(user); return properties.getBookmarkedStopIds().size() - 1; }  @Autowired void setUserDao(UserDao dao); @Autowired void setUserPropertiesMigration(
      UserPropertiesMigration userPropertiesMigration); @Override Class<? extends UserProperties> getUserPropertiesType(); @Override UserBean getUserAsBean(User user, UserBean bean); @Override UserBean getAnonymousUserAsBean(UserBean bean); @Override void setRememberUserPreferencesEnabled(User user,
      boolean rememberPreferencesEnabled); @Override void setDefaultLocation(User user, String locationName, double lat,
      double lon); @Override void clearDefaultLocation(User user); @Override int addStopBookmark(User user, String name, List<String> stopIds,
      RouteFilter filter); @Override void updateStopBookmark(User user, int id, String name,
      List<String> stopIds, RouteFilter routeFilter); @Override void deleteStopBookmarks(User user, int index); @Override void setLastSelectedStopIds(User user, List<String> stopIds); @Override void resetUser(User user); @Override void mergeProperties(User sourceUser, User targetUser); @Override void authorizeApi(User user, long minRequestInteval); @Override void markServiceAlertAsRead(User user, String situationId, long time,
      boolean isRead); @Override void updateApiKeyContactInfo(User user, String contactName, 
      String contactCompany, String contactEmail, String contactDetails); @Override void disableUser(User user); @Override void activateUser(User user);  }
@Test public void testAddStopBookmark() throws BookmarkException { User user = createUser(); _service.addStopBookmark(user, "bookmkark", Arrays.asList("1"), new RouteFilter()); List<String> bookmarks = getProperties(user).getBookmarkedStopIds(); assertEquals(1, bookmarks.size()); assertTrue(bookmarks.contains("1")); }