| 1175 | |
| 1176 | #[test] |
| 1177 | fn test_method_with_throws() { |
| 1178 | let mut parser = JavaParser::new(); |
| 1179 | let source = r#" |
| 1180 | public class Service { |
| 1181 | public void process() throws IOException, ParseException { |
| 1182 | } |
| 1183 | } |
| 1184 | "#; |
| 1185 | let entities = parser.extract(source, "Service.java"); |
| 1186 | let process = entities.iter().find(|e| e.name == "process"); |
| 1187 | assert!(process.is_some(), "Should find process method"); |
| 1188 | // The throws clause may or may not appear in the signature depending on |
| 1189 | // tree-sitter's AST structure, but the method should be found. |
| 1190 | } |
| 1191 | |
| 1192 | #[test] |
| 1193 | fn test_static_method() { |