class MoneyUtils {

    public static BigDecimal secondOrFirst(final Pair<BigDecimal, BigDecimal> firstAndSecond) {
        return firstAndSecond.getSecond() == null ? firstAndSecond.getFirst() : firstAndSecond.getSecond();
    }

    private  MoneyUtils();

}