Fixes for tests. Validthru filter for hibernate queries.