@@ -0,0 +1,1031 @@
+package com.billyyccc.strategydemotest;%0A%0Aimport com.billyyccc.strategydemo.Discount;%0Aimport org.junit.Test;%0A%0A/**%0A * Created by Billy Yuan on 2017/6/23.%0A * Email: billy112487983@gmail.com%0A */%0A%0Apublic class StrategyDemoInJava8Test %7B%0A    @Test%0A    public void discountStrategyATest() %7B%0A        Discount discount = new Discount(() -%3E %7B%0A            System.out.println(%22apply BookDiscountStrategyA...%22);%0A            System.out.println(%22%E5%85%A8%E5%9C%BA%E5%9B%BE%E4%B9%A6%E6%89%93%E5%85%AB%E6%8A%98...%22);%0A        %7D);%0A        discount.discountBook();%0A    %7D%0A%0A    @Test%0A    public void discountStrategyBTest() %7B%0A        Discount discount = new Discount(() -%3E %7B%0A            System.out.println(%22apply BookDiscountStrategyB...%22);%0A            System.out.println(%22%E5%85%A8%E5%9C%BA%E5%9B%BE%E4%B9%A6%E6%89%93%E4%BA%94%E6%8A%98...%22);%0A        %7D);%0A        discount.discountBook();%0A    %7D%0A%0A    @Test%0A    public void discountStrategyCTest() %7B%0A        Discount discount = new Discount(() -%3E %7B%0A            System.out.println(%22apply BookDiscountStrategyC...%22);%0A            System.out.println(%22%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%B1%BB%E5%9B%BE%E4%B9%A6%E6%BB%A1200%E6%89%93%E5%85%AD%E6%8A%98%22);%0A        %7D);%0A        discount.discountBook();%0A    %7D%0A%0A%7D%0A

Refactor Stragety With Lambda