@Test
public void testIsTimeFieldValid()
{

    QueryItem iA = new QueryItem( createDataElement( 'A', new CategoryCombo() ) );
    EventQueryParams params = new EventQueryParams.Builder()
        .withProgram( prA )
        .withTimeField( deC.getUid() )
        .addItem( iA ).build();
    assertTrue( params.timeFieldIsValid() );
    params = new EventQueryParams.Builder()
        .withProgram( prA )
        .withTimeField( TimeField.DUE_DATE.name() )
        .addItem( iA ).build();
    assertTrue( params.timeFieldIsValid() );
    params = new EventQueryParams.Builder()
        .withProgram( prA )
        .withTimeField( "someInvalidTimeField" )
        .addItem( iA ).build();
    assertFalse( params.timeFieldIsValid() );
}