@Override
    public InputStream getInputStream() throws IOException {
        switch (failValue) {
            case 0:
                return new InputStream() {
                    @Override
                    public int read() throws IOException {
                        return 1;
                    }
                };
            case 1:
                return null;
            default:
                throw new IOException();
        }
    }