Replace Sample class by Instance in test