RDFFileParameter implements IStringConverter<List<FileGraphFormat>>, IParameterValidator { @Override public List<FileGraphFormat> convert(String value) { String[] values = value.split(","); List<FileGraphFormat> fileList = new ArrayList<>(); for (String val : values) { FileGraphFormat file = build(val); fileList.add(file); } return fileList; }  @Override List<FileGraphFormat> convert(String value); FileGraphFormat build(String value); @Override void validate(String name, String value);  }
@Test public void testConvert() { System.out.println("convert"); String value = "test.rdf#test>xml,test2.rdf"; RDFFileParameter instance = new RDFFileParameter(); List<FileGraphFormat> expResult = Arrays.asList(new FileGraphFormat(new File("test.rdf"), "test", RDFFormat.RDFXML), new FileGraphFormat(new File("test2.rdf"), "", RDFFormat.TTL)); List<FileGraphFormat> result = instance.convert(value); assertEquals(expResult, result); }