Finally got the method to extract test samples to work!