added makeQueryBuilder to EnvironmentFactory and cleaned up integration test