RDFFileParameter implements IStringConverter<List<FileGraphFormat>>, IParameterValidator { @Override public void validate(String name, String value) throws ParameterException { int formatIndex; int nameIndex; String[] values = value.split(","); for (String val : values) { formatIndex = val.indexOf(FORMAT_SEP); nameIndex = val.indexOf(NAME_SEP); if (formatIndex > -1 && nameIndex > -1) { if (formatIndex < nameIndex) { throw new ParameterException("Parameter " + name + " and value " + val + " must have format (" + formatIndex + ") after graph name (" + nameIndex + ")."); } } } }  @Override List<FileGraphFormat> convert(String value); FileGraphFormat build(String value); @Override void validate(String name, String value);  }
@Test(expected = ParameterException.class) public void testValidate() { System.out.println("validate"); String name = "--rdf_file"; String value = "test.rdf>xml#test"; RDFFileParameter instance = new RDFFileParameter(); instance.validate(name, value); }