Add test for proxy methods on default methods.

Bug: 27621360
Change-Id: I221aae340c9a7af8ba8f0afa918e0e5b1a0e0b29
diff --git a/luni/src/test/java/libcore/java/lang/reflect/ProxyTest.java b/luni/src/test/java/libcore/java/lang/reflect/ProxyTest.java
index abd5851..505c78a 100644
--- a/luni/src/test/java/libcore/java/lang/reflect/ProxyTest.java
+++ b/luni/src/test/java/libcore/java/lang/reflect/ProxyTest.java
@@ -411,4 +411,25 @@
         assertFalse(field.isAnnotationPresent(Deprecated.class));
       }
     }
+
+    public interface DefaultMethod {
+      static final Object DEFAULT_RETURN_VALUE = new Object();
+      default Object test() {
+        return DEFAULT_RETURN_VALUE;
+      }
+    }
+
+    // Make sure we can proxy default methods.
+    public void testProxyDefault() throws Exception {
+      Object invocationHandlerReturnValue = new Object();
+      // Just always return the different object.
+      InvocationHandler handler = (o, m, oa) -> invocationHandlerReturnValue;
+      DefaultMethod dm = (DefaultMethod) Proxy.newProxyInstance(
+          Thread.currentThread().getContextClassLoader(),
+          new Class[] { DefaultMethod.class },
+          handler);
+
+      assertTrue(dm != null);
+      assertEquals(invocationHandlerReturnValue, dm.test());
+    }
 }