Convert samples to tests