Make query part of customer and tests for.