GetLineageByInstanceExec extends MetadataAPIBase { @Override public List<GetLineageByInstanceExecInfo> execute(String[] params) { List<GetLineageByInstanceExecInfo> lineageByInstanceExecInfos; try { CommandLine commandLine = getCommandLine(params, PARAMS_STRUCTURE); String eid = commandLine.getOptionValue("instance-exec-id"); LOGGER.debug("Instance exec id is " + eid); GetLineageByInstanceExecInfo getLineageByInstanceExecInfo = new GetLineageByInstanceExecInfo(); getLineageByInstanceExecInfo.setInstanceExecId(Long.parseLong(eid)); lineageByInstanceExecInfos = lineageByInstanceExecDAO.LineageByInstanceExec(getLineageByInstanceExecInfo); LOGGER.debug("Details of batch is " + lineageByInstanceExecInfos); return lineageByInstanceExecInfos; } catch (Exception e) { LOGGER.error("Error occurred", e); throw new MetadataException(e); } } GetLineageByInstanceExec(); @Override List<GetLineageByInstanceExecInfo> execute(String[] params);  }
@Ignore @Test public void testExecute() throws Exception { GetLineageByInstanceExec getLineageByInstanceExec = new GetLineageByInstanceExec(); String[] args = {"-eid", "1"}; List<GetLineageByInstanceExecInfo> lineageByInstanceExecInfoList = getLineageByInstanceExec.execute(args); System.out.println("lineageByInstanceExecInfoList = " + lineageByInstanceExecInfoList); }