UserMapper { public UserLinks computeUserLinks(String basePath, Date updateDate) { UserLinks userLinks = new UserLinks(); final String hash = updateDate == null ? "" : String.valueOf(updateDate.getTime()); userLinks.setAvatar(basePath + "/avatar?" + hash); userLinks.setNotifications(basePath + "/notifications"); userLinks.setSelf(basePath); return userLinks; }  User convert(UserEntity user); User convert(SearchableUser user); NewExternalUserEntity convert(RegisterUserInput input); RegisterUserEntity convert(FinalizeRegistrationInput input); UserLinks computeUserLinks(String basePath, Date updateDate);  }
@Test public void testUserLinks() { String basePath = "/user"; UserLinks links = userMapper.computeUserLinks(basePath, null); assertNotNull(links); assertEquals(basePath, links.getSelf()); assertEquals(basePath + "/avatar?", links.getAvatar()); assertEquals(basePath + "/notifications", links.getNotifications()); assertEquals(basePath, links.getSelf()); }