Extract getClient() method