sComments = visitor.getComments();
sRoot = new Node(JavaEntityType.METHOD, "foo");
sRoot.setEntity(new SourceCodeEntity("foo", JavaEntityType.METHOD, new SourceRange()));
AbstractMethodDeclaration method = CompilationUtils.findMethod(sCompilation.getCompilationUnit(), "foo");
JavaMethodBodyConverter bodyT = sInjector.getInstance(JavaMethodBodyConverter.class);
bodyT.initialize(sRoot, method, sComments, sCompilation.getScanner());
method.traverse(bodyT, (ClassScope) null);
}
@Test
public void proximityRatingShouldAssociateCommentToClosestEntity() throws Exception {