@Override
	public void applyRenewPolicy(LibraryModel model, List<LibraryView> views,
			List<Copy> toRenew, String borrowerID) {
		List<Copy> reservedCopies = new LinkedList<Copy>();
		List<Copy> toRemove = new LinkedList<Copy>();
		for (Copy copy : toRenew) {
			Item item = model.findItem(copy.getRelatedItemID());
			List<Reservation> sortedReservations = getReservationsOfItem(model,
					item.getID());
			Collections.sort(sortedReservations);
			if (sortedReservations.size() > 0 || copy.isRecalled()) {
				/*
				 * In case that there are reservations or the copy is recalled,
				 * check...
				 */
				if (sortedReservations.size() <= countOfFreeCopiesOfItem(model,
						copy.getRelatedItemID())) {
					/*
					 * ...if there are more free copies than reservations remove
					 * any outstanding reservation of this borrower that is not
					 * the first.
					 */
					for (Reservation reservation : sortedReservations) {
						if (reservation.getIssuerID().equals(borrowerID)) {
							model.removeReservation(reservation.getId());
						}
					}
					copy.setRecalled(false);
					model.updateCopy(copy);
				} else {
					/*
					 * ...or remove the copy from the items to issue and tell
					 * the borrower that there are not enough copies.
					 */
					toRemove.add(copy);
					reservedCopies.add(copy);
				}
			}
		}
		for (Copy copy : toRemove) {
			toRenew.remove(copy);
		}
		if (reservedCopies.size() > 0) {
			viewsShowErrorMessage(views, "Issue Item",
					"The following items have been reserved and therefore removed from the list: "
							+ getStringOfCopies(model, reservedCopies));
		}
	}