    @Test
    public void bitwise() throws Exception {

        String str = "a&=b|c|=d&e^=f^g;";

        LexerStream ls = new LexerStream(new StringReader(str));
        LexOperator lex = new LexOperator(new BaseTokenFactory(), ls);

        ls.read();

        Token tok = lex.read();

        assertEquals(TokenType.BitwiseAndAssign, tok.getType());
        assertEquals(1, tok.getLine());
        assertEquals(2, tok.getCol());
        assertEquals(1, tok.getEndLine());
        assertEquals(4, tok.getEndCol());

        ls.read();

        tok = lex.read();

        assertEquals(TokenType.BitwiseOr, tok.getType());
        assertEquals(1, tok.getLine());
        assertEquals(5, tok.getCol());
        assertEquals(1, tok.getEndLine());
        assertEquals(6, tok.getEndCol());

        ls.read();

        tok = lex.read();

        assertEquals(TokenType.BitwiseOrAssign, tok.getType());
        assertEquals(1, tok.getLine());
        assertEquals(7, tok.getCol());
        assertEquals(1, tok.getEndLine());
        assertEquals(9, tok.getEndCol());

        ls.read();

        tok = lex.read();

        assertEquals(TokenType.BitwiseAnd, tok.getType());
        assertEquals(1, tok.getLine());
        assertEquals(10, tok.getCol());
        assertEquals(1, tok.getEndLine());
        assertEquals(11, tok.getEndCol());

        ls.read();

        tok = lex.read();

        assertEquals(TokenType.XorAssign, tok.getType());
        assertEquals(1, tok.getLine());
        assertEquals(12, tok.getCol());
        assertEquals(1, tok.getEndLine());
        assertEquals(14, tok.getEndCol());

        ls.read();

        tok = lex.read();

        assertEquals(TokenType.Xor, tok.getType());
        assertEquals(1, tok.getLine());
        assertEquals(15, tok.getCol());
        assertEquals(1, tok.getEndLine());
        assertEquals(16, tok.getEndCol());

        assertEquals('g', ls.read());

        tok = lex.read();
        assertEquals(TokenType.Semicolon, tok.getType());

        assertEquals(-1, ls.read());

    }