@Test public void testSetInput_Reader() { try { parser.setInput(new StringReader("")); fail("This method should not be supported"); } catch (XmlPullParserException ex) { // pass } }
@Test public void testSetInput_InputStreamString() throws IOException { try (InputStream inputStream = getClass().getResourceAsStream("src/test/resources/res/xml/preferences.xml")) { parser.setInput(inputStream, "UTF-8"); fail("This method should not be supported"); } catch (XmlPullParserException ex) { // pass } }