@Test
  public void rateAndGetUserRating() {
    try {
      Point geom = (Point) GeometryUtils.geometryFromWKT(POINT_TORRE_HERCULES);
      TIPDetailsDto towerHercules =
          tipService.create(
              MONUMENT_DISCRIMINATOR,
              "Tower of Hercules",
              "Human Patrimony",
              VALID_TIP_PHOTO_URL,
              null,
              geom,
              null,
              true,
              null);
      TIP tip = tipDao.findById(towerHercules.getId());

      Double rate = 10.0D;
      ratingService.rate(rate, tip.getId(), EXISTING_FACEBOOK_USER_ID);
      assertEquals(rate, ratingService.getUserTIPRate(tip.getId(), EXISTING_FACEBOOK_USER_ID));
    } catch (Exception e) {
      e.printStackTrace();
      fail();
    }
  }
  @Override
  public void syncTIPs(List<TIPSyncDto> tipSyncDtos) {
    List<Long> osmIds = new ArrayList<>();
    for (TIPSyncDto tipSyncDto : tipSyncDtos) {
      try {
        Long osmId = tipSyncDto.getOsm_id();
        osmIds.add(osmId);

        Long tipTypeId = tipSyncDto.getTip_type_id();
        TIPtype tipType = tipTypeDao.findById(tipTypeId);

        Geometry geom = GeometryUtils.latLong2Geom(tipSyncDto.getLon(), tipSyncDto.getLat());

        try {
          TIP tip = tipDao.findByOSMId(osmId);
          edit(
              tip,
              null,
              tipType,
              tipSyncDto.getName(),
              null,
              tipSyncDto.getInfo_url(),
              tip.getAddress(),
              tipSyncDto.getPhoto_url());
        } catch (InstanceNotFoundException e) {
          createSyncTIPs(
              tipType,
              tipSyncDto.getName(),
              null,
              tipSyncDto.getPhoto_url(),
              tipSyncDto.getInfo_url(),
              geom,
              osmId,
              true);
        }
      } catch (Exception e) {
        e.printStackTrace();
      }
    }
    // FIXME: No sé si es buena idea eliminar automáticamente los TIPs que se han eliminado de
    // OSM... Igual sería mejor sacar un listado y eliminarlos manualmente (por si tienen reviews,
    // comentarios...)
    // Se eliminan los TIPs obtenidos de OSM que ya no existan.
    tipDao.deleteNonExistingFromOSMIds(osmIds);
  }