@Test
public void test_cancelPoint_use_all() {

    rec.setTotal(BigDecimal.valueOf(200L).setScale(DecimalUtils.SCALE_2))
            .setAvailable(BigDecimal.valueOf(30L).setScale(DecimalUtils.SCALE_2))
            .setCancelled(BigDecimal.valueOf(20L).setScale(DecimalUtils.SCALE_2))
            .setFrozen(DecimalUtils.ZERO)
            .setTotalCost(BigDecimal.valueOf(100L).setScale(DecimalUtils.SCALE_2))
            .setUsedCost(BigDecimal.valueOf(40L).setScale(DecimalUtils.SCALE_2))
            .setFrozenCost(BigDecimal.valueOf(10L).setScale(DecimalUtils.SCALE_2));
    PointRecCalcResult result = calculator.cancelPoint(rec, BigDecimal.valueOf(30L));
    log.info("result = {}", result);
    Assertions.assertEquals(rec.getId(), result.getRec4Update().getId());
    Assertions.assertEquals(DecimalUtils.ZERO,   //
            rec.getAvailable());
    Assertions.assertEquals(DecimalUtils.ZERO,   //
            result.getRec4Update().getAvailable());
    Assertions.assertEquals(BigDecimal.valueOf(50L).setScale(DecimalUtils.SCALE_2), rec.getCancelled());
    Assertions.assertEquals(BigDecimal.valueOf(50L).setScale(DecimalUtils.SCALE_2), result.getRec4Update().getCancelled());
    Assertions.assertEquals(BigDecimal.valueOf(90L).setScale(DecimalUtils.SCALE_2), rec.getUsedCost());
    Assertions.assertEquals(BigDecimal.valueOf(90L).setScale(DecimalUtils.SCALE_2), result.getRec4Update().getUsedCost());
    Assertions.assertEquals(BigDecimal.valueOf(50L).setScale(DecimalUtils.SCALE_2), result.getDeltaCost());
    Assertions.assertFalse(rec.getEnable());
    Assertions.assertFalse(result.getRec4Update().getEnable());
}