@Test
public void testGetCount_noConditionNoPattern() throws ParseException {

    final String sql = "select count(m.id) from mm_matchup m, mm_observation r where r.time >= ?1 and r.time < ?2 and r.id = m.refobs_id";
    final Date startDate = createDate("2010-06-02T00:00:00Z");
    final Date stopDate = createDate("2010-06-05T00:00:00Z");
    final MatchupQueryParameter parameter = new MatchupQueryParameter();
    parameter.setStartDate(startDate);
    parameter.setStopDate(stopDate);
    when(query.getSingleResult()).thenReturn(19);
    when(persistenceManager.createNativeQuery(sql)).thenReturn(query);
    final int count = matchupStorage.getCount(parameter);
    assertEquals(19, count);
    verify(persistenceManager, times(1)).createNativeQuery(sql);
    verifyNoMoreInteractions(persistenceManager);
    verify(query, times(1)).setParameter(1, startDate);
    verify(query, times(1)).setParameter(2, stopDate);
    verify(query, times(1)).getSingleResult();
    verifyNoMoreInteractions(query);
}