@Test
void methodChain() {

    Token token = parser.parse("method1().method2()");
    assertThat(token).isInstanceOf(MethodToken.class);
    MethodToken methodToken = (MethodToken) token;
    assertThat(methodToken.name).isEqualTo("method1");
    assertThat(methodToken.params).isEmpty();
    assertThat(methodToken.next).isInstanceOf(MethodToken.class);
    MethodToken methodToken2 = (MethodToken) ((MethodToken) token).next;
    assertThat(methodToken2.name).isEqualTo("method2");
    assertThat(methodToken2.params).isEmpty();
}