@Test
public void testAdd() {

    ValueResolution res = new ValueResolution();
    assertThat(res.totalCount()).isEqualTo(0);
    assertThat(res.resolvedCount()).isEqualTo(0);
    assertThat(res.unresolvedCount()).isEqualTo(0);
    assertTrue(res.resolved().isEmpty());
    InputValue inputResolved = new InputValue(TokenType.AND, "and");
    assertTrue(inputResolved.isResolved());
    InputValue inputUnresolved = new InputValue(new Token(TokenType.BETWEEN, "bet", 0, 3), null);
    assertFalse(inputUnresolved.isResolved());
    res.add(inputResolved);
    assertThat(res.totalCount()).isEqualTo(1);
    assertThat(res.resolvedCount()).isEqualTo(1);
    assertThat(res.unresolvedCount()).isEqualTo(0);
    assertTrue(res.resolved().contains(inputResolved));
    res.add(inputUnresolved);
    assertThat(res.totalCount()).isEqualTo(2);
    assertThat(res.resolvedCount()).isEqualTo(1);
    assertThat(res.unresolvedCount()).isEqualTo(1);
    assertTrue(res.resolved().contains(inputResolved));
    assertFalse(res.resolved().contains(inputUnresolved));
    assertThat(res.resolvedValue(0)).isSameAs(inputResolved);
    assertThat(res.unresolvedValue(0)).isSameAs(inputUnresolved);
}