update test_client2 to use resource, generation

fixes bugs