extracting client code from integration test