The test is red. What I'm doing wrong? ``` ann...
# reflect
a
The test is red. What I'm doing wrong?
Copy code
annotation class FooBar

    interface Foo {
        @FooBar val bar: Any
    }

    @Test fun test() {
        val classLoader = Foo::class.java.classLoader
        val interfaces = arrayOf(Foo::class.java)

        val proxy = Proxy.newProxyInstance(classLoader, interfaces) { obj, method, args ->
            if(method.name == "getBar")
                assertEquals(method.declaredAnnotations.size, 1)
        } as Foo

        proxy.bar
    }