{
private final int[] CHUNK_SIZES = new int[] { 1, 2, 3, 5, 9, 33 };
public void testNoDeclaration() throws Exception
{
AsyncXMLInputFactory f = new InputFactoryImpl();
for (String XML : new String[] { " <root />", "<root/>" }) {
for (int chunkSize : CHUNK_SIZES) {
AsyncXMLStreamReader sr = f.createAsyncXMLStreamReader();
AsyncReaderWrapper reader = new AsyncReaderWrapper(sr, chunkSize, XML);
assertEquals(EVENT_INCOMPLETE, reader.currentToken());
assertTokenType(START_DOCUMENT, reader.nextToken());
// no info, however; except for encoding auto-detection
assertNull(sr.getCharacterEncodingScheme());