StringToPathConverter implements Converter<String, Path> { @Override public Path convert(String source) { return Paths.get(source); }  @Override Path convert(String source);  }
@Test public void testConvert() { String source = "some/path"; StringToPathConverter instance = new StringToPathConverter(); Path result = instance.convert(source); assertEquals(source, result.toString()); }
@Test(expected = NullPointerException.class) public void testConvertNull() { String source = null; StringToPathConverter instance = new StringToPathConverter(); instance.convert(source); }