@Test
public void testSingleFieldEquality() {

    final QueryToKeyMatcher matcher = new QueryToKeyMatcher(queryField("a").equalsValue(7));
    Match match = matcher.matchesSatisfyingQuery(keyField("a"));
    assertEquals(MatchType.EQUALITY, match.getType());
    assertEquals(Key.Evaluated.scalar(7), match.getEquality());
    match = matcher.matchesSatisfyingQuery(concatenateFields("a", "b"));
    assertEquals(MatchType.EQUALITY, match.getType());
    assertEquals(Key.Evaluated.scalar(7), match.getEquality());
    assertNoMatch(matcher.matchesSatisfyingQuery(keyField("b")));
    assertNoMatch(matcher.matchesSatisfyingQuery(keyField("a", FanType.FanOut)));
    assertNoMatch(matcher.matchesSatisfyingQuery(keyField("a", FanType.Concatenate)));
    assertNoMatch(matcher.matchesSatisfyingQuery(keyField("b").nest("a")));
    assertNoMatch(matcher.matchesSatisfyingQuery(keyField("a").nest("b")));
    assertNoMatch(matcher.matchesSatisfyingQuery(concatenateFields("b", "a")));
}