[sample] Factor out adapter into separate class