public void assertTokensEqual(TokenStream stream, String... tokens) {
        if (tokens.length == 0)
            assertEquals(null, stream.next());
        else {
            for (String token : tokens) {
                stream.next();
                assertEquals(token, stream.getCurrentToken());
            }
        }
    }