final Charge charge = this.chargeRepository.findOneWithNotFoundDetection(id);
if (!charge.isSavingsCharge()) {
final String errorMessage = "Charge with identifier " + charge.getId()
+ " cannot be applied to Savings product.";
throw new ChargeCannotBeAppliedToException("savings.product", errorMessage, charge.getId());
}
if (!savingsProductCurrencyCode.equals(charge.getCurrencyCode())) {
final String errorMessage = "Charge and Savings Product must have the same currency.";
throw new InvalidCurrencyException("charge", "attach.to.savings.product", errorMessage);