@Test
public void testBasicTypesMatch() {
final AtomicInteger hit = new AtomicInteger();
Source s = new Source(SIMPLE_SOURCE, "SimpleTypesMatchTest.java");
s.parseCompilationUnit();
s.getNodes().get(0).accept(new ForwardingAstVisitor() {
@Override public boolean visitMethodDeclaration(MethodDeclaration node) {
assertTrue("typesMatch with star import should match but fails:" + node.astReturnTypeReference(),
new Resolver().typesMatch("java.util.List", node.astReturnTypeReference()));
assertFalse("typesMatch with no relevant imports should fail but matches",