InvokableReferenceTypeUsage implements TypeUsage, Invokable { @Override public boolean hasInstanceField(String fieldName, Symbol instance) { return false; } InvokableReferenceTypeUsage(InternalInvokableDefinition internalInvokableDefinition); @Override TypeUsage replaceTypeVariables(Map<String, T> typeParams); @Override boolean sameType(TypeUsage other); @Override boolean isInvokable(); @Override Invokable asInvokable(); @Override JvmType jvmType(); @Override boolean hasInstanceField(String fieldName, Symbol instance); @Override Symbol getInstanceField(String fieldName, Symbol instance); @Override Optional<Invokable> getMethod(String method, boolean staticContext); @Override boolean canBeAssignedTo(TypeUsage type); @Override boolean isOverloaded(); @Override Optional<InternalInvokableDefinition> internalInvokableDefinitionFor(List<ActualParam> actualParams); @Override String describe(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test public void testHasInstanceField() { Symbol instance = EasyMock.createMock(Symbol.class); EasyMock.replay(instance); assertEquals(false, invokableA.hasInstanceField("foo", instance)); assertEquals(false, invokableB.hasInstanceField("foo", instance)); assertEquals(false, invokableC.hasInstanceField("foo", instance)); assertEquals(false, invokableD.hasInstanceField("foo", instance)); EasyMock.verify(instance); }