writer.flush();
output.close();
DataModelReader<Object> reader = support.createReader("testing", new ByteArrayInputStream(output.toByteArray()));
assertThat(reader.readTo(buffer.unwrap()), is(true));
assertThat(buffer.getOption("value"), is((Object) new StringOption("Hello\nworld!")));
assertThat(buffer.getOption("number"), is((Object) new LongOption(1)));
assertThat(reader.readTo(buffer.unwrap()), is(true));
assertThat(buffer.getOption("value"), is((Object) new StringOption("Hello\nworld!")));
assertThat(buffer.getOption("number"), is((Object) new LongOption(2)));
assertThat(reader.readTo(buffer.unwrap()), is(false));
}