checkParserStateNs(xpp, 1, xpp.START_TAG, null, 0, "", "foo", null, true, 0);
checkParserStateNs(xpp, 1, XmlPullParser.START_TAG, null, 0, "", "foo", null, true, 0);
    public void testSetReader() throws Exception {        XmlPullParser xpp = factory.newPullParser();        assertEquals(true, xpp.getFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES));        xpp.setInput(null);        assertEquals(XmlPullParser.START_DOCUMENT, xpp.getEventType());        try {            xpp.next();            fail("exception was expected of next() if no input was set on parser");        } catch(XmlPullParserException ex) {}        // make input suspectible to read ...        ReaderWrapper reader = new ReaderWrapper(            new StringReader("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><foo/>"));        assertEquals("no read() called in just contructed reader", false, reader.calledRead());        xpp.setInput(reader);        checkParserStateNs(xpp, 0, xpp.START_DOCUMENT, null, 0, null, null, null, false, -1);        assertEquals("read() not called before next()", false, reader.calledRead());        xpp.next();        assertEquals("read() must be called after next()", true, reader.calledRead());        checkParserStateNs(xpp, 1, xpp.START_TAG, null, 0, "", "foo", null, true/*empty*/, 0);    }