ParameterParser { long offset() { return new OffsetParam(param(OffsetParam.NAME)).getOffset(); } ParameterParser(QueryStringDecoder decoder, Configuration conf); boolean createParent(); EnumSet<CreateFlag> createFlag();  }
@Test public void testOffset() throws IOException { final long X = 42; long offset = new OffsetParam(Long.toString(X)).getOffset(); Assert.assertEquals("OffsetParam: ", X, offset); offset = new OffsetParam((String) null).getOffset(); Assert.assertEquals("OffsetParam with null should have defaulted to 0", 0, offset); try { offset = new OffsetParam("abc").getValue(); Assert.fail("OffsetParam with nondigit value should have thrown IllegalArgumentException"); } catch (IllegalArgumentException iae) { } }