package java8;

import com.sandwich.koan.Koan;

import static com.sandwich.koan.constant.KoanConstants.__;
import static com.sandwich.util.Assert.assertEquals;


interface StringUtil {

    //static method in interface
    static String enclose(String in){
        return "[" + in + "]";
    }

    String reverse(String s);

    //interface can contain non-abstract method implementations marked by "default" keyword
    default String capitalize(String s) {
        return s.toUpperCase();
    }

    default String capitalizeFirst(String s) {
        return s.substring(0, 1).toUpperCase() + s.substring(1);
    }
}

public class AboutDefaultMethods {

    @Koan
    public void interfaceDefaultMethod() {
        StringUtil stringUtil = new StringUtil() {
            @Override
            public String reverse(String s) {
                return new StringBuilder(s).reverse().toString();
            }
        };
        String capitalizedReversed = stringUtil.capitalize(
                stringUtil.reverse("gnirut"));
        assertEquals(capitalizedReversed, __);
    }

    @Koan
    public void interfaceStaticMethod() {
        assertEquals(StringUtil.enclose("me"), __);
    }

}

@@ -158,467 +158,8 @@
 s;%0A%0A
-%0Ainterface StringUtil %7B%0A%0A    //static method in interface%0A    static String enclose(String in)%7B%0A        return %22%5B%22 + in + %22%5D%22;%0A    %7D%0A%0A    String reverse(String s);%0A%0A    //interface can contain non-abstract method implementations marked by %22default%22 keyword%0A    default String capitalize(String s) %7B%0A        return s.toUpperCase();%0A    %7D%0A%0A    default String capitalizeFirst(String s) %7B%0A        return s.substring(0, 1).toUpperCase() + s.substring(1);%0A    %7D%0A%7D%0A%0A
 publ
@@ -725,10 +725,524 @@
 %0A    %7D%0A%0A
+    interface StringUtil %7B%0A%0A        //static method in interface%0A        static String enclose(String in)%7B%0A            return %22%5B%22 + in + %22%5D%22;%0A        %7D%0A%0A        String reverse(String s);%0A%0A        //interface can contain non-abstract method implementations marked by %22default%22 keyword%0A        default String capitalize(String s) %7B%0A            return s.toUpperCase();%0A        %7D%0A%0A        default String capitalizeFirst(String s) %7B%0A            return s.substring(0, 1).toUpperCase() + s.substring(1);%0A        %7D%0A    %7D%0A%0A
 %7D%0A

Update AboutDefaultMethods.java