@Test
public void test_accountPoint() {

    PointRecPo rec = new PointRecPo();
    BigDecimal cost = BigDecimal.valueOf(45).setScale(DecimalUtils.SCALE_2);
    rec.setAvailable(DecimalUtils.ZERO);
    BigDecimal result = this.calculator.accountPoint(rec, cost);
    Assertions.assertEquals(DecimalUtils.ZERO, result);
    rec.setTotalCost(BigDecimal.valueOf(100L).setScale(DecimalUtils.SCALE_2))
            .setUsedCost(BigDecimal.valueOf(80L).setScale(DecimalUtils.SCALE_2))
            .setFrozenCost(DecimalUtils.ZERO)
            .setRefundCost(DecimalUtils.ZERO);
    result = this.calculator.accountPoint(rec, cost);
    Assertions.assertEquals(DecimalUtils.ZERO, result);
    rec.setTotal(BigDecimal.valueOf(200L).setScale(DecimalUtils.SCALE_2))
            .setTotalCost(BigDecimal.valueOf(100L).setScale(DecimalUtils.SCALE_2))
            .setUsedCost(BigDecimal.valueOf(50L).setScale(DecimalUtils.SCALE_2))
            .setFrozenCost(DecimalUtils.ZERO).setRefundCost(DecimalUtils.ZERO);
    BigDecimal expect = BigDecimal.valueOf(90L).setScale(DecimalUtils.SCALE_2);  //  45 / 100 * 200
    result = this.calculator.accountPoint(rec, cost);
    Assertions.assertEquals(expect, result);
}