package java8;

import java7.UnitTestRunner;
import org.junit.Test;
import static org.junit.Assert.*;

public class InterfaceMethodTest {
    
    public interface IF1 {
        static int x() {
            return 1;
        }
        default int y() {
            return 2;
        }
    }
    
    public class IMPL1 implements IF1 {
        
    }
    
    public static void main(String[] args) {
        UnitTestRunner.run(InterfaceMethodTest.class);
    }
    
    @Test
    public void staticMethod() {
        assertEquals(1, IF1.x());
    }
    
    @Test
    public void defaultMethod() {
        assertEquals(2, new IMPL1().y());
    }
    
}

@@ -158,17 +158,17 @@
 erface I
-F
+f
 1 %7B%0A    
@@ -304,18 +304,25 @@
 lic 
+static 
 class I
-MPL
+mpl
 1 im
@@ -331,17 +331,17 @@
 ements I
-F
+f
 1 %7B%0A    
@@ -348,32 +348,325 @@
     %0A    %7D%0A    %0A
+    public static class Impl2 implements If1 %7B        %0A        @Override%0A        public int y() %7B%0A            return 12;%0A        %7D%0A    %7D%0A    %0A    public static class Impl3 implements If1 %7B%0A        @Override%0A        public int y() %7B%0A            return 100 + If1.super.y();%0A        %7D%0A    %7D%0A    %0A
     public stati
@@ -832,9 +832,9 @@
 1, I
-F
+f
 1.x(
@@ -925,12 +925,99 @@
 ew I
-MPL1
+mpl1().y());%0A        assertEquals(12, new Impl2().y());%0A        assertEquals(102, new Impl3
 ().y

test interface method