@Test
public void testValidateUsingQuery() {

    presenter._setDataSetDef( dataSetDef );
    presenter.editor = sqlDataSetDefAttributesEditor;
    when( sqlDataSetDefAttributesEditor.isUsingQuery() ).thenReturn( true );
    presenter.validate();
    verify( sqlDataSetDefValidator, times( 1 ) ).validateCustomAttributes( any( SQLDataSetDef.class ), eq( true ) );
    verify( sqlDataSetDefValidator, times( 0 ) ).validate( any( SQLDataSetDef.class ),
                                                           anyBoolean(),
                                                           anyBoolean(),
                                                           anyBoolean() );
}