@@ -0,0 +1,1378 @@
+package com.loyaltyplant.test.domain.operation;%0A%0Aimport com.loyaltyplant.test.domain.Balance;%0Aimport com.loyaltyplant.test.domain.BalanceOperation;%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0Aimport javax.annotation.Nonnegative;%0Aimport javax.annotation.Nonnull;%0Aimport java.math.BigDecimal;%0A%0A/**%0A * Deposit Operation.%0A * Perform account replenishment for given amount.%0A * Amount must have non-negative value.%0A *%0A * @author Maksim Zakharov%0A * @since 1.0%0A */%0Apublic class DepositOperation implements BalanceOperation %7B%0A%0A    private static final Logger LOG = LoggerFactory.getLogger(DepositOperation.class);%0A%0A    private final BigDecimal amount;%0A%0A    public DepositOperation(@Nonnegative BigDecimal amount) %7B%0A        if (amount.compareTo(new BigDecimal(%220%22)) %3C 0) %7B%0A            throw new IllegalArgumentException(%22Can't deposit negative amount%22);%0A        %7D%0A%0A        this.amount = amount;%0A    %7D%0A%0A    @Override%0A    public void apply(@Nonnull Balance balance) %7B%0A        if (LOG.isInfoEnabled()) %7B%0A            LOG.info(%22Applying deposit of %7B%7D for Balance #%7B%7D%22, getAmount(), balance.getId());%0A        %7D%0A        doApply(balance);%0A    %7D%0A%0A    private void doApply(Balance balance) %7B%0A        final BigDecimal newAmount = balance.getAmount().subtract(getAmount());%0A        balance.setAmount(newAmount);%0A    %7D%0A%0A    public BigDecimal getAmount() %7B%0A        return amount;%0A    %7D%0A%7D%0A

Prepare Deposit Operation implementation.