TextParameterDataSegment extends AbstractDataSegment { public final void clear () { super.clear(); settings.clear(); } TextParameterDataSegment(final int initChunkSize); final void add(final OperationalTextKey textKey, final String value); final void addAll(final SettingsMap textKeys); final int append(final ByteBuffer src, final int len); final int deserialize(final ByteBuffer src, final int len); final SettingsMap getSettings(); final void clear(); final boolean equals(final Object anObject); @Override final int hashCode();  }
@Test public final void testClear () throws Exception { final TextParameterDataSegment dataSegment = new TextParameterDataSegment(CHUNK_SIZE); assertNotNull(dataSegment); assertTrue(dataSegment.getSettings().entrySet().isEmpty()); dataSegment.add(OperationalTextKey.HEADER_DIGEST, "Yes"); assertFalse(dataSegment.getSettings().entrySet().isEmpty()); dataSegment.clear(); assertNotNull(dataSegment); assertTrue(dataSegment.getSettings().entrySet().isEmpty()); }