/** @see DATAKV-114 */
  @Test
  public void countsEntitiesWithNullProperty() throws Exception {

    doReturn(people).when(adapter).getAllOf(anyString());

    assertThat(
        engine.count(createQueryForMethodWithArgs("findByFirstname", "bob"), anyString()), is(1L));
  }
  /** @see DATAKV-114 */
  @Test
  @SuppressWarnings("unchecked")
  public void queriesEntitiesWithNullProperty() throws Exception {

    doReturn(people).when(adapter).getAllOf(anyString());

    assertThat(
        (Collection<Person>)
            engine.execute(
                createQueryForMethodWithArgs("findByFirstname", "bob"), null, -1, -1, anyString()),
        contains(BOB_WITH_FIRSTNAME));
  }
  @Before
  public void setUp() {

    engine = new SpelQueryEngine<KeyValueAdapter>();
    engine.registerAdapter(adapter);
  }