Added tests for hasFields()