GetFiles extends MetadataAPIBase { @Override public List<FileInfo> execute(String[] params) { try { FileInfo fileInfo = new FileInfo(); CommandLine commandLine = getCommandLine(params, PARAMS_STRUCTURE); String minBId = commandLine.getOptionValue("min-batch-id"); LOGGER.debug("minimum-batch-id is " + minBId); String maxBId = commandLine.getOptionValue("max-batch-id"); LOGGER.debug("maximum-batch-id is " + maxBId); fileInfo.setMinBatch(Long.parseLong(minBId)); fileInfo.setMaxBatch(Long.parseLong(maxBId)); return fileDAO.getFiles(Long.parseLong(minBId), Long.parseLong(maxBId)); } catch (Exception e) { LOGGER.error("Error occurred", e); throw new MetadataException(e); } } GetFiles(); @Override List<FileInfo> execute(String[] params);  }
@Ignore @Test public void testExecute() throws Exception { String[] args = {"--maxB", "1", "--minB", "0"}; GetFiles getFiles = new GetFiles(); List<FileInfo> fileInfos = getFiles.execute(args); LOGGER.info("fileInfos=" + fileInfos); }