### Question:
LocationExtractor { public static ILexLocation extractLocation(INode node) { try { Method method = node.getClass().getMethod("getLocation"); return (ILexLocation) method.invoke(node); } catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { e.printStackTrace(); } return null; }  static ILexLocation extractLocation(INode node);  }### Answer:
@Test public void testExtractLocation() { @SuppressWarnings("deprecation") AInterleavingReplicatedAction node = new AInterleavingReplicatedAction(new LexLocation("test", "Test", 0, 0, 1, 1, 0, 1), null, null, null); ILexLocation loc = LocationExtractor.extractLocation(node); Assert.assertNotNull(loc); Assert.assertEquals("Test", loc.getModule()); }