import static org.junit.Assert.*;
public class MetadataParserTests {
@Test
public void testGenericMethodResolution() throws Throwable {
final MethodInfo reflectedMethod = Type.of(Collections.class).getMethods(BindingFlags.AllDeclared).get(1);
final String signature = reflectedMethod.getSignature();
final MetadataParser parser = new MetadataParser(MetadataSystem.instance());
final TypeReference collectionsType = parser.lookupType("java.util", "Collections");
final MethodReference method1 = parser.parseMethod(collectionsType, reflectedMethod.getName(), signature);
assertNotNull(method1);
final IMethodSignature methodSignature = parser.parseMethodSignature(signature);
assertNotNull(methodSignature);
final MethodReference method2 = parser.lookupMethod(collectionsType, reflectedMethod.getName(), methodSignature);
assertNotNull(method2);
}