RDFFileParameter implements IStringConverter<List<FileGraphFormat>>, IParameterValidator { public FileGraphFormat build(String value) { File file; String name = ""; RDFFormat format = RDFFormat.TTL; String target = value; if (target.contains(FORMAT_SEP)) { String[] parts = target.split(FORMAT_SEP); format = FORMAT_PARAMETER.convert(parts[1]); target = parts[0]; } if (target.contains(NAME_SEP)) { String[] parts = target.split(NAME_SEP); name = parts[1]; target = parts[0]; } file = new File(target); return new FileGraphFormat(file, name, format); }  @Override List<FileGraphFormat> convert(String value); FileGraphFormat build(String value); @Override void validate(String name, String value);  }
@Test public void testBuild() { System.out.println("build"); String value = "test.rdf>xml"; RDFFileParameter instance = new RDFFileParameter(); FileGraphFormat expResult = new FileGraphFormat(new File("test.rdf"), "", RDFFormat.RDFXML); FileGraphFormat result = instance.build(value); assertEquals(expResult, result); }