Place place = getIgeliPlace();
String ratingComment = "somecomment";
Rating rating = new Rating();
rating.setComment(ratingComment);
Rate r1 = Rate.R10;
rating.setRate(r1);
service.ratePlace(place, rating);
rating = new Rating();
rating.setComment(ratingComment);
Rate r2 = Rate.R5;
rating.setRate(r2);
service.ratePlace(place, rating);
rating = new Rating();
rating.setComment(ratingComment);
Rate r3 = Rate.R3;
rating.setRate(r3);
service.ratePlace(place, rating);
int avgRate = ((r1.getValue() + r2.getValue() + r3.getValue()) / 3);
Rate totalRate = Rate.valueOf(avgRate);
TotalRating totalRating = service.getTotalRating(place);
assertEquals(totalRate, totalRating.getRate());
}