public int length() {
        try {
            final StringBuilder s = read(MIN_LENGTH);
            pushBack.append(s);
            return s.length();
        } catch (IOException ex) {
            LOGGER.warn("Oops ", ex);
        }
        return 0;
    }
@Test
    public void testLength() {
        String data = "";
        InputStream stream = new ByteArrayInputStream(data.getBytes(StandardCharsets.UTF_8));
        XmlInputStream instance = new XmlInputStream(stream);
        int expResult = 0;
        int result = instance.length();
        assertEquals(expResult, result);

        data = "Input data";
        stream = new ByteArrayInputStream(data.getBytes(StandardCharsets.UTF_8));
        instance = new XmlInputStream(stream);
        result = instance.length();
        assertTrue(result > 0);
    }