### Question:
JarIdPathParameter extends MessagePathParameter<String> { @Override protected String convertFromString(final String value) throws ConversionException { final Path path = Paths.get(value); if (path.getParent() != null) { throw new ConversionException(String.format("%s must be a filename only (%s)", KEY, path)); } return value; } protected  JarIdPathParameter();  static final String KEY; }### Answer:
@Test(expected = ConversionException.class) public void testJarIdWithParentDir() throws Exception { jarIdPathParameter.convertFromString("../../test.jar"); }
@Test public void testConvertFromString() throws Exception { final String expectedJarId = "test.jar"; final String jarId = jarIdPathParameter.convertFromString(expectedJarId); assertEquals(expectedJarId, jarId); }