### Question:
SubtaskIndexPathParameter extends MessagePathParameter<Integer> { @Override protected Integer convertFromString(final String value) throws ConversionException { final int subtaskIndex = Integer.parseInt(value); if (subtaskIndex >= 0) { return subtaskIndex; } else { throw new ConversionException("subtaskindex must be positive, was: " + subtaskIndex); } } SubtaskIndexPathParameter();  static final String KEY; }### Answer:
@Test public void testConversionFromString() throws Exception { assertThat(subtaskIndexPathParameter.convertFromString("2147483647"), equalTo(Integer.MAX_VALUE)); }
@Test public void testConversionFromStringNegativeNumber() throws Exception { try { subtaskIndexPathParameter.convertFromString("-2147483648"); fail("Expected exception not thrown"); } catch (final ConversionException e) { assertThat(e.getMessage(), equalTo("subtaskindex must be positive, was: " + Integer .MIN_VALUE)); } }