@Test(expected = FileNotFoundException.class) public void fileNotFound() throws Exception { argonOptionsConverter.convert("path/to/nothing"); }
@Override public ArgonOptions convert(String value) throws Exception { final Path path = Paths.get(value); if (!Files.exists(path)) { throw new FileNotFoundException(String.format("%s not found.", path)); } try (InputStream in = Files.newInputStream(path)) { return JaxbUtil.unmarshal(in, ArgonOptions.class); } }
ArgonOptionsConverter implements CommandLine.ITypeConverter<ArgonOptions> { @Override public ArgonOptions convert(String value) throws Exception { final Path path = Paths.get(value); if (!Files.exists(path)) { throw new FileNotFoundException(String.format("%s not found.", path)); } try (InputStream in = Files.newInputStream(path)) { return JaxbUtil.unmarshal(in, ArgonOptions.class); } } }
ArgonOptionsConverter implements CommandLine.ITypeConverter<ArgonOptions> { @Override public ArgonOptions convert(String value) throws Exception { final Path path = Paths.get(value); if (!Files.exists(path)) { throw new FileNotFoundException(String.format("%s not found.", path)); } try (InputStream in = Files.newInputStream(path)) { return JaxbUtil.unmarshal(in, ArgonOptions.class); } }  }
ArgonOptionsConverter implements CommandLine.ITypeConverter<ArgonOptions> { @Override public ArgonOptions convert(String value) throws Exception { final Path path = Paths.get(value); if (!Files.exists(path)) { throw new FileNotFoundException(String.format("%s not found.", path)); } try (InputStream in = Files.newInputStream(path)) { return JaxbUtil.unmarshal(in, ArgonOptions.class); } }  @Override ArgonOptions convert(String value); }
ArgonOptionsConverter implements CommandLine.ITypeConverter<ArgonOptions> { @Override public ArgonOptions convert(String value) throws Exception { final Path path = Paths.get(value); if (!Files.exists(path)) { throw new FileNotFoundException(String.format("%s not found.", path)); } try (InputStream in = Files.newInputStream(path)) { return JaxbUtil.unmarshal(in, ArgonOptions.class); } }  @Override ArgonOptions convert(String value);  }