@Test(expected = LayoutInflaterException.class)
public void inflate_IOException_exceptionThrown() {

    inflater.inflate(new InputStream() {
        @Override
        public int read() throws IOException {
            throw new IOException();
        }
    });
}