Created new test to check for isActive flag and corrected JPA query.